catalyst!
authorDaniel Robbins <drobbins@gentoo.org>
Wed, 29 Oct 2003 08:03:00 +0000 (08:03 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Wed, 29 Oct 2003 08:03:00 +0000 (08:03 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@33 d1e1f19c-881f-0410-ab34-b69fee027534

catalyst
modules/targets.py
targets/stage3/stage3.sh

index 6fa738895c6266f5b473d040f36d3f48e416085e..4664247711dad62e08a8c608e1b074d7f5a338f5 100755 (executable)
--- 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)
index e5d5362839e3b1cf738852a979ff5a9f71ecf6dd..c4eaf302338b832b68b190a27d17b2003109c127 100644 (file)
@@ -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")
index a8a56c9a39297ce4a393ae201a0c01ab34bd2633..9d0eb4c484c48bd01868e414dca10cddbab433a2 100755 (executable)
@@ -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