Added a cleanup_stages function and added it to the appropriate places.
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 20 Feb 2008 02:00:07 +0000 (02:00 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 20 Feb 2008 02:00:07 +0000 (02:00 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1307 d1e1f19c-881f-0410-ab34-b69fee027534

12 files changed:
ChangeLog
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

index 0fcc89bbfa4325b08502b3e8da2f58ca906bc332..3e652379774fcae057d3e555b1137119dbe755e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
 # 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,
index 608c9fd4a4443311552ded974c1bc6deba678bab..2e8814b50c2c92c07f79a6f07d79d14b29bc9648 100755 (executable)
@@ -1,14 +1,5 @@
 #!/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
index 3cefd5637842e851f99473498be1dfd16d2852f7..948cf2accf57e41b0e4a154bc8a746361b44c6d7 100755 (executable)
@@ -1,16 +1,7 @@
 #!/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
index 608c9fd4a4443311552ded974c1bc6deba678bab..2e8814b50c2c92c07f79a6f07d79d14b29bc9648 100755 (executable)
@@ -1,14 +1,5 @@
 #!/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
index 3ec42db99b9582c1a6d91c0771d4ef2a13ab264b..b4f6f2cf3374f524014508595579ea07bdb811fd 100755 (executable)
@@ -23,9 +23,3 @@ clst_root_path=/ setup_portage
 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/*
index 84bcb03d3a3996989f8c2d008340c2af363bab1e..53cb849aa9a5513b7bcb39017fbe9625a6973919 100755 (executable)
@@ -17,14 +17,4 @@ else
        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
index f7813944c488986262c651b743fa6ca0268e48f6..0636bb4e1744f14e84270a28088b1abd4b9640e6 100755 (executable)
@@ -2,7 +2,7 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
+cleanup_stages
 
 if [ -n "${clst_CCACHE}" ]
 then
@@ -12,13 +12,9 @@ fi
 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
index 1daf0341c464b1ba3dd0dcf70e10d1f80424b558..1bf134b4028f9c5c39419449b800babd3c72a045 100755 (executable)
@@ -6,8 +6,3 @@
 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/*
index f7813944c488986262c651b743fa6ca0268e48f6..0636bb4e1744f14e84270a28088b1abd4b9640e6 100755 (executable)
@@ -2,7 +2,7 @@
 
 . /tmp/chroot-functions.sh
 
-update_env_settings
+cleanup_stages
 
 if [ -n "${clst_CCACHE}" ]
 then
@@ -12,13 +12,9 @@ fi
 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
index 31fa8d6bb55bae8d3a4fbbb46005e1a64e205844..2f73ba4469f66a222c18d99ab34c05232b6c35e5 100755 (executable)
@@ -1,4 +1,13 @@
 #!/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
index 54277041a7ad483c03b7c48c204b7c3176dd394e..d9123554bd76dc9f677a270726da98e67e9479a1 100755 (executable)
@@ -178,19 +178,35 @@ cleanup_distcc() {
        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(){
index 608c9fd4a4443311552ded974c1bc6deba678bab..2f73ba4469f66a222c18d99ab34c05232b6c35e5 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/bash
 
 . /tmp/chroot-functions.sh
-update_env_settings
 
 if [ -n "${clst_DISTCC}" ]
 then