summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-30 07:28:57 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-30 07:28:57 +0000
commit70e62933cc29377dd30946e9e8c7b99517ed0815 (patch)
treee073d87a4be1a1bb78583b37d2175f587c39ac0e
parentBug #71646 - Don't allow the HISTFILE variable into the ebuild environment (diff)
downloadportage-multirepo-70e62933cc29377dd30946e9e8c7b99517ed0815.tar.gz
portage-multirepo-70e62933cc29377dd30946e9e8c7b99517ed0815.tar.bz2
portage-multirepo-70e62933cc29377dd30946e9e8c7b99517ed0815.zip
Put ebuild helpers at the absolute front of the PATH. (trunk r13404)
svn path=/main/branches/2.1.6/; revision=13545
-rwxr-xr-xbin/ebuild.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 83e79e81..02587d9c 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -71,8 +71,12 @@ unalias -a
# Unset some variables that break things.
unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE
-export PATH="/usr/local/sbin:/sbin:/usr/sbin:$PORTAGE_BIN_PATH/ebuild-helpers:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}"
-[ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH"
+ROOTPATH=${ROOTPATH##:}
+ROOTPATH=${ROOTPATH%%:}
+PREROOTPATH=${PREROOTPATH##:}
+PREROOTPATH=${PREROOTPATH%%:}
+PATH=$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin${ROOTPATH:+:}$ROOTPATH
+export PATH
source "${PORTAGE_BIN_PATH}/isolated-functions.sh" &>/dev/null
@@ -1913,8 +1917,7 @@ ebuild_main() {
;;
esac
- export PATH="/usr/local/sbin:/sbin:/usr/sbin:${ebuild_helpers_path}:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}"
- [[ -n $PREROOTPATH ]] && export PATH="${PREROOTPATH%%:}:$PATH"
+ PATH=$ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin${ROOTPATH:+:}$ROOTPATH
unset ebuild_helpers_path
if ! hasq $EBUILD_SH_ARGS clean depend help info nofetch ; then