stage1 improvements
authorDaniel Robbins <drobbins@gentoo.org>
Mon, 3 Nov 2003 15:46:14 +0000 (15:46 +0000)
committerDaniel Robbins <drobbins@gentoo.org>
Mon, 3 Nov 2003 15:46:14 +0000 (15:46 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@42 d1e1f19c-881f-0410-ab34-b69fee027534

modules/targets.py
targets/stage1/stage1-chroot.sh
targets/stage1/stage1.sh

index e0c2ab1f942f12fb3c06d32cd81b77aca5dace49..ea820cb8b3673f93ec04ade1028a319ffae960ac 100644 (file)
@@ -156,9 +156,12 @@ class generic_stage_target(generic_target):
 
        def clean(self):
                destpath=self.settings["chroot_path"]
+               cleanables=["/etc/resolv.conf","/usr/portage","/var/tmp/*","/tmp/*","/root/*"]
                if self.settings["target"]=="stage1":
                        destpath+="/tmp/stage1root"
-               for x in ["/etc/resolv.conf","/usr/portage","/var/tmp/*","/tmp/*","/root/*"]: 
+                       #this next stuff can eventually be integrated into the python and glibc ebuilds themselves (USE="build"):
+                       cleanables.extend(["/usr/share/gettext","/usr/lib/python2.2/test","/usr/lib/python2.2/encodings","/usr/lib/python2.2/email","/usr/lib/python2.2/lib-tk","/usr/share/zoneinfo"])
+               for x in cleanables: 
                        cmd("rm -rf "+destpath+x,"Couldn't clean "+x)
                cmd(self.settings["storedir"]+"/targets/"+self.settings["target"]+"/"+self.settings["target"]+".sh clean","clean script failed.")
        
index 671942bd38d53f742e44a8e44b1751ff39f06415..045ebd018209f0504fd8535dedd5406dd6029c74 100755 (executable)
@@ -39,6 +39,9 @@ case $1 in
                        mythang=\$( cd /etc/env.d/gcc; ls ${clst_CHOST}-* )
                        gcc-config \${mythang}; env-update; source /etc/profile
                fi
+               #stage1 is not going to have anything in zoneinfo, so save our Factory timezone
+               rm -f /etc/localtime
+               cp /usr/share/zoneinfo/Factory /etc/localtime
 EOF
        ;;              
 esac
index 57de781c61a1660ad42a670248cd7eeffdbb09f6..60b71a797cb3c6a644b309661632e56455654b0e 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/stage1/Attic/stage1.sh,v 1.6 2003/11/03 02:43:55 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/Attic/stage1.sh,v 1.7 2003/11/03 15:46:14 drobbins Exp $
 
 case $1 in
 enter)
@@ -49,7 +49,7 @@ clean)
        # zap all .pyc and .pyo files
        find -iname "*.py[co]" -exec rm -f {} \;
        # cleanup all .a files except libgcc.a, *_nonshared.a and /usr/lib/portage/bin/*.a
-       find -iname "*.a" | `find -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' | grep -v '/usr/lib/portage/bin/' | grep -v 'libgcc_eh.a'` | xargs rm -f
+       find -iname "*.a" | grep -v 'libgcc.a' | grep -v 'nonshared.a' | grep -v '/usr/lib/portage/bin/' | grep -v 'libgcc_eh.a' | xargs rm -f
        ;;
 *)
        exit 1