From 196590952074a5f5fc25fb186f12c69b0386d19a Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Mon, 3 Nov 2003 15:46:14 +0000 Subject: [PATCH] stage1 improvements git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@42 d1e1f19c-881f-0410-ab34-b69fee027534 --- modules/targets.py | 5 ++++- targets/stage1/stage1-chroot.sh | 3 +++ targets/stage1/stage1.sh | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/targets.py b/modules/targets.py index e0c2ab1f..ea820cb8 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -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.") diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 671942bd..045ebd01 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -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 diff --git a/targets/stage1/stage1.sh b/targets/stage1/stage1.sh index 57de781c..60b71a79 100755 --- a/targets/stage1/stage1.sh +++ b/targets/stage1/stage1.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/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 -- 2.26.2