OK, we shouldn't use which to find env-update, since /usr/sbin isn't in the PATH...
authorChris Gianelloni <wolf31o2@gentoo.org>
Thu, 21 Feb 2008 17:04:45 +0000 (17:04 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Thu, 21 Feb 2008 17:04:45 +0000 (17:04 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1323 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/support/chroot-functions.sh

index f3553b22d784ba9d1b22f921a681fe46226e8c92..3bc07b7beb87085ed2b8bc67ef2a591f2e3b1cd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  21 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+  targets/support/chroot-functions.sh:
+  OK, we shouldn't use which to find env-update, since /usr/sbin isn't in the
+  PATH by default. Instead, simply check if it exists.
+
   21 Feb 2008; Andrew Gaffney <agaffney@gentoo.org>
   targets/support/chroot-functions.sh:
   Remove temporary package listing code, since --verbose is forced on with
index 89f0c96455869f583344bbc58345cd164455f5b7..e1c9bacf45e3ab300178190a07206dd6053d26bb 100755 (executable)
@@ -214,15 +214,7 @@ cleanup_stages() {
 }
 
 update_env_settings(){
-       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
+       [ -x /usr/sbin/env-update ] && /usr/sbin/env-update
        source /etc/profile
        [ -f /tmp/envscript ] && source /tmp/envscript
 }
@@ -285,6 +277,7 @@ show_debug() {
                # TODO: grab our entire env
                # <zmedico> to get see the ebuild env you can do something like:
                # `set > /tmp/env_dump.${EBUILD_PHASE}` inside /etc/portage/bashrc
+               # XXX: Also, portageq does *not* source profile.bashrc at any time.
                echo
                echo "STAGE1_USE:            $(portageq envvar STAGE1_USE)"
                echo