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.")
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
# 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)
# 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