# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 20 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+ targets/embedded/embedded-preclean-chroot.sh,
+ targets/grp/grp-preclean-chroot.sh,
+ targets/livecd-stage1/livecd-stage1-preclean-chroot.sh,
+ targets/stage1/stage1-chroot.sh, targets/stage1/stage1-preclean-chroot.sh,
+ targets/stage2/stage2-preclean-chroot.sh, targets/stage3/stage3-chroot.sh,
+ targets/stage3/stage3-preclean-chroot.sh,
+ targets/stage4/stage4-preclean-chroot.sh,
+ targets/support/chroot-functions.sh,
+ targets/tinderbox/tinderbox-preclean-chroot.sh:
+ Added a cleanup_stages function and added it to the appropriate places.
+
20 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
targets/embedded/embedded-chroot.sh, targets/grp/grp-chroot.sh,
targets/livecd-stage1/livecd-stage1-chroot.sh,
#!/bin/bash
. /tmp/chroot-functions.sh
-update_env_settings
-if [ -n "${clst_DISTCC}" ]
-then
- cleanup_distcc
-fi
-
-if [ -n "${clst_ICECREAM}" ]
-then
- cleanup_icecream
-fi
+cleanup_stages
#!/bin/bash
. /tmp/chroot-functions.sh
-update_env_settings
-if [ -n "${clst_DISTCC}" ]
-then
- cleanup_distcc
-fi
-
-if [ -n "${clst_ICECREAM}" ]
-then
- cleanup_icecream
-fi
+cleanup_stages
gconftool-2 --shutdown
#!/bin/bash
. /tmp/chroot-functions.sh
-update_env_settings
-if [ -n "${clst_DISTCC}" ]
-then
- cleanup_distcc
-fi
-
-if [ -n "${clst_ICECREAM}" ]
-then
- cleanup_icecream
-fi
+cleanup_stages
USE="-build" run_emerge "--oneshot --nodeps virtual/baselayout"
USE="-* bindist build ${STAGE1_USE} ${HOSTUSE}" run_emerge "--noreplace --oneshot ${clst_buildpkgs}"
-
-rm -f /var/lib/portage/world
-touch /var/lib/portage/world
-
-rm -f /var/log/emerge.log /var/log/portage/elog/* /etc/xml/catalog
-rm -rf /var/tmp/*
echo UTC > /etc/TZ
fi
-#if [ -n "${clst_CCACHE}" ]
-#then
-# run_emerge -C dev-util/ccache || exit 1
-#fi
-
-#if [ -n "${clst_DISTCC}" ]
-#then
-# run_emerge -C sys-devel/distcc || exit 1
-#fi
-
-#cleanup_distcc
+cleanup_stages
. /tmp/chroot-functions.sh
-update_env_settings
+cleanup_stages
if [ -n "${clst_CCACHE}" ]
then
if [ -n "${clst_DISTCC}" ]
then
run_emerge -C sys-devel/distcc || exit 1
- cleanup_distcc
fi
if [ -n "${clst_ICECREAM}" ]
then
run_emerge -C sys-devel/icecream || exit 1
- cleanup_icecream
fi
-
-rm -f /var/log/emerge.log
setup_portage
run_emerge "-e system"
-
-rm -f /var/lib/portage/world
-touch /var/lib/portage/world
-
-rm -f /var/log/emerge.log /var/log/portage/elog/*
. /tmp/chroot-functions.sh
-update_env_settings
+cleanup_stages
if [ -n "${clst_CCACHE}" ]
then
if [ -n "${clst_DISTCC}" ]
then
run_emerge -C sys-devel/distcc || exit 1
- cleanup_distcc
fi
if [ -n "${clst_ICECREAM}" ]
then
run_emerge -C sys-devel/icecream || exit 1
- cleanup_icecream
fi
-
-rm -f /var/log/emerge.log
#!/bin/bash
. /tmp/chroot-functions.sh
-#update_env_settings
+
+if [ -n "${clst_DISTCC}" ]
+then
+ cleanup_distcc
+fi
+
+if [ -n "${clst_ICECREAM}" ]
+then
+ cleanup_icecream
+fi
rm -rf /etc/distcc/hosts
for i in cc gcc c++ g++; do
# TODO: change to use get_libdir
- rm /usr/lib/distcc/bin/${i}
+ rm -f /usr/lib/distcc/bin/${i}
ln -s /usr/bin/distcc /usr/lib/distcc/bin/${i}
done
- rm /usr/lib/distcc/bin/*-wrapper
+ rm -f /usr/lib/distcc/bin/*-wrapper
}
cleanup_icecream() {
LIBDIR=$(get_libdir)
for i in cc gcc c++ g++; do
- rm /usr/${LIBDIR}/icecc/bin/${i}
+ rm -f /usr/${LIBDIR}/icecc/bin/${i}
ln -s /usr/bin/icecc /usr/${LIBDIR}/icecc/bin/${i}
done
- rm /usr/${LIBDIR}/icecc/bin/*-wrapper
+ rm -f /usr/${LIBDIR}/icecc/bin/*-wrapper
+}
+
+cleanup_stages() {
+ if [ -n "${clst_DISTCC}" ]
+ then
+ cleanup_distcc
+ fi
+ if [ -n "${clst_ICECREAM}" ]
+ then
+ cleanup_icecream
+ fi
+ rm -f /var/lib/portage/world
+ touch /var/lib/portage/world
+
+ rm -f /var/log/emerge.log /var/log/portage/elog/*
+ rm -rf /var/tmp/*
}
update_env_settings(){
#!/bin/bash
. /tmp/chroot-functions.sh
-update_env_settings
if [ -n "${clst_DISTCC}" ]
then