ebuild.sh: setup PATH earlier
authorZac Medico <zmedico@gentoo.org>
Mon, 12 Sep 2011 00:33:18 +0000 (17:33 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Sep 2011 00:33:18 +0000 (17:33 -0700)
This avoids "uname: command not found" messages from
isolated-functions.sh.

bin/ebuild.sh

index 42616d0f9e3be1152cb695d0c531d94087a95f36..1cb9269dfbf6904eb86f63d58c04700a45fdc9d4 100755 (executable)
@@ -5,6 +5,13 @@
 PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"
 PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}"
 
+ROOTPATH=${ROOTPATH##:}
+ROOTPATH=${ROOTPATH%%:}
+PREROOTPATH=${PREROOTPATH##:}
+PREROOTPATH=${PREROOTPATH%%:}
+PATH=$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin${ROOTPATH:+:}$ROOTPATH
+export PATH
+
 # Prevent aliases from causing portage to act inappropriately.
 # Make sure it's before everything so we don't mess aliases that follow.
 unalias -a
@@ -47,13 +54,6 @@ fi
 # environment by modifying our PATH.
 unset BASH_ENV
 
-ROOTPATH=${ROOTPATH##:}
-ROOTPATH=${ROOTPATH%%:}
-PREROOTPATH=${PREROOTPATH##:}
-PREROOTPATH=${PREROOTPATH%%:}
-PATH=$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin${ROOTPATH:+:}$ROOTPATH
-export PATH
-
 # This is just a temporary workaround for portage-9999 users since
 # earlier portage versions do not detect a version change in this case
 # (9999 to 9999) and therefore they try execute an incompatible version of