Moved creating of stage1 package list to the beginning of stage1-chroot.sh so we...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 21 Feb 2008 02:03:30 +0000 (02:03 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 21 Feb 2008 02:03:30 +0000 (02:03 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1318 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/stage1/stage1-chroot.sh
targets/stage2/stage2-chroot.sh
targets/support/chroot-functions.sh

index cb6c56980fab1b203cd4713ece509e1b93ed7564..b7748d6e0f995008a31ce0ed20f6e8e2164195b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,19 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  21 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+  targets/stage1/stage1-chroot.sh, targets/stage2/stage2-chroot.sh,
+  targets/support/chroot-functions.sh:
+  Moved creating of stage1 package list to the beginning of stage1-chroot.sh
+  so we can get the output with --debug, added --newuse to the options for
+  stage1, as we should always rebuild any package where the USE has changed,
+  removed removal of portage logs from stage2-chroot.sh since it is being done
+  by cleanup_stages, moved world removal in cleanup_stages into a check for
+  stages 1 through 3, made update_env_settings check for the existence of
+  env-update before running it since we now run update_env_settings by default
+  everywhere chroot-functions.sh is sourced, and added a section to show_debug
+  to list the packages, since we don't yet force-enable verbose with debug.
+
   20 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
   modules/catalyst_lock.py:
   Since my python sucks and I don't feel like troubleshooting it at the
index 9f9747645743811b033ac4c50fe4683c93886ee7..e4f344742d1b4323c1e30ef7b4ef9be17971c6ef 100755 (executable)
@@ -1,9 +1,11 @@
 #!/bin/bash
 
+# We do this first, so we know our package list for --debug
+export clst_buildpkgs="$(/tmp/build.py)"
+
 source /tmp/chroot-functions.sh
 
 # Setup our environment
-export clst_buildpkgs="$(/tmp/build.py)"
 export STAGE1_USE="$(portageq envvar STAGE1_USE)"
 export USE="-* bindist build ${STAGE1_USE}"
 export FEATURES="${clst_myfeatures} nodoc noman noinfo"
@@ -22,4 +24,4 @@ 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}"
+USE="-* bindist build ${STAGE1_USE} ${HOSTUSE}" run_emerge "--noreplace --oneshot --newuse ${clst_buildpkgs}"
index e696d044b64167fe4e59c68046ff68b176120e8b..ca86d9019d40a6395d0149e3d3fdb9c8bf501081 100755 (executable)
@@ -20,4 +20,3 @@ fi
 ## START BUILD
 /usr/portage/scripts/bootstrap.sh ${bootstrap_opts} || exit 1
 
-rm -f /var/log/emerge.log /var/log/portage/elog/*
index d9123554bd76dc9f677a270726da98e67e9479a1..e15c8309105751f3d5529f1050d5aba3aaa8624a 100755 (executable)
@@ -202,15 +202,30 @@ cleanup_stages() {
        then
                cleanup_icecream
        fi
-       rm -f /var/lib/portage/world
-       touch /var/lib/portage/world
+       case ${clst_target} in
+               stage1|stage2|stage3)
+                       rm -f /var/lib/portage/world
+                       touch /var/lib/portage/world
+                       ;;
+               *)
+                       echo "Skipping removal of world file for ${clst_target}"
+                       ;;
+       esac
 
        rm -f /var/log/emerge.log /var/log/portage/elog/*
        rm -rf /var/tmp/*
 }
 
 update_env_settings(){
-       /usr/sbin/env-update
+       which env-update > /dev/null 2>&1
+       ret=$?
+       if [ $ret -eq 0 ]
+       then
+               ENV_UPDATE=`which env-update`
+               ${ENV_UPDATE}
+       else
+               echo "WARNING: env-update not found, skipping!"
+       fi
        source /etc/profile
        [ -f /tmp/envscript ] && source /tmp/envscript
 }
@@ -265,7 +280,9 @@ run_emerge() {
 show_debug() {
        if [ "${clst_DEBUG}" = "1" ]
        then
+               unset PACKAGES
                echo "DEBUG:"
+               echo "Profile/target info:"
                echo "Profile inheritance:"
                python -c 'import portage; print portage.settings.profiles'
                echo
@@ -287,6 +304,21 @@ show_debug() {
                echo "KERNEL_ABI:            $(portageq envvar KERNEL_ABI)"
                echo "MULTILIB_ABIS:         $(portageq envvar MULTILIB_ABIS)"
                echo
+               ### XXX: This is temporary until we make --debug force-enable --verbose
+               if [ -n "${clst_buildpkgs}" ]
+               then
+                       PACKAGES=${clst_buildpkgs}
+               elif [ -n "${clst_packages}" ]
+               then
+                       PACKAGES=${clst_packages}
+               fi
+               if [ -n "${PACKAGES}" ]
+               then
+                       echo "Packages:"
+                       echo "${PACKAGES}"
+                       echo
+               fi
+               ### XXX: end of section to remove
        fi
 }