From ceaf9f46d91ca8afe0bdfcf9a2e27c787172cc06 Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Wed, 29 Oct 2003 08:03:00 +0000 Subject: [PATCH] catalyst! git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@33 d1e1f19c-881f-0410-ab34-b69fee027534 --- catalyst | 9 ++------- modules/targets.py | 11 +++++++---- targets/stage3/stage3.sh | 5 +++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/catalyst b/catalyst index 6fa73889..46642477 100755 --- a/catalyst +++ b/catalyst @@ -18,8 +18,6 @@ import targets targetmap={} targets.register(targetmap) -print "Available targets:",string.join(targetmap.keys()) - if os.getuid()!=0: #non-root callers can't go any further than here. die("This script requires root privileges to operate.") @@ -33,8 +31,10 @@ myspec["distdir"]="/mnt/misc/distfiles" myspec["portdir"]="/usr/portage" myspec["options"]="ccache pkgcache" if "ccache" in string.split(myspec["options"]): + print "Compiler cache support enabled." myspec["CCACHE"]="1" if "pkgcache" in string.split(myspec["options"]): + print "Package cache support enabled." myspec["PKGCACHE"]="1" #determine target, call target constructor and hand it the rest of the arguments @@ -45,11 +45,6 @@ try: raise CatalystError,"Target \""+myspec["target"]+"\" not available." mytarget=targetmap[myspec["target"]](myspec,addlargs) - #let's display our spec information in all its glory - print - spec_dump(myspec) - print - mytarget.run() except CatalystError: sys.exit(1) diff --git a/modules/targets.py b/modules/targets.py index e5d53628..c4eaf302 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -155,12 +155,15 @@ class generic_stage_target(generic_target): raise CatalystError, "Sed command failed: "+mycmd def clean(self): - "do not call without first unbinding" - os.system("rm -f"+self.settings["chroot_path"]+"/etc/ld.so.preload") - retval=os.system("rm -f"+self.settings["chroot_path"]+"/etc/resolv.conf") + "do not call without first unbinding; this code needs a cleanup once it stabilizes" + os.system("rm -f "+self.settings["chroot_path"]+"/etc/ld.so.preload") + retval=os.system("rm -f "+self.settings["chroot_path"]+"/etc/resolv.conf") if retval!=0: raise CatalystError,"Could not clean up resolv.conf." - retval=os.system("rm -f"+self.settings["chroot_path"]+"/usr/portage") + retval=os.system("rm -rf "+self.settings["chroot_path"]+"/usr/portage") + if retval!=0: + raise CatalystError,"Could not clean up Portage tree." + retval=os.system("rm -rf "+self.settings["chroot_path"]+"/var/tmp/*") if retval!=0: raise CatalystError,"Could not clean up Portage tree." retval=os.system(self.settings["storedir"]+"/targets/"+self.settings["target"]+"/"+self.settings["target"]+".sh clean") diff --git a/targets/stage3/stage3.sh b/targets/stage3/stage3.sh index a8a56c9a..9d0eb4c4 100755 --- a/targets/stage3/stage3.sh +++ b/targets/stage3/stage3.sh @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/Attic/stage3.sh,v 1.3 2003/10/29 06:52:15 drobbins Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/Attic/stage3.sh,v 1.4 2003/10/29 08:03:00 drobbins Exp $ case $1 in enter) @@ -40,7 +40,7 @@ clean) source /etc/profile if [ -n "${clst_CCACHE}" ] then - emerge -C ccache || exit 1 + emerge -C dev-util/ccache || exit 1 fi EOF [ $? -ne 0 ] && exit 1 @@ -49,3 +49,4 @@ EOF exit 1 ;; esac +exit 0 -- 2.26.2