summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-11-01 19:17:19 -0700
committerZac Medico <zmedico@gentoo.org>2011-11-01 19:17:19 -0700
commit1af0c40b1300651ca03a7509f49f152c1e595736 (patch)
tree6d967ae665bf98c9ba8219fb812a9678a127a57e /bin/ebuild.sh
parent889853171246ab1063bb5015caf41a41761f5424 (diff)
downloadportage-1af0c40b1300651ca03a7509f49f152c1e595736.tar.gz
portage-1af0c40b1300651ca03a7509f49f152c1e595736.tar.bz2
portage-1af0c40b1300651ca03a7509f49f152c1e595736.zip
Add EPREFIX and ED support in all ebuild helpers.
This allows our prefix tests to use helpers like insinto, doins, and dosym.
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 7b77c1077..5648a9762 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -597,17 +597,19 @@ if ! has "$EBUILD_PHASE" clean cleanrm ; then
PATH=$_ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin${ROOTPATH:+:}$ROOTPATH
unset _ebuild_helpers_path
+ _eprefix=${EPREFIX}
+ case "$EAPI" in 0|1|2) _eprefix= ;; esac
# Use default ABI libdir in accordance with bug #355283.
x=LIBDIR_${DEFAULT_ABI}
[[ -n $DEFAULT_ABI && -n ${!x} ]] && x=${!x} || x=lib
if has distcc $FEATURES ; then
- PATH="/usr/$x/distcc/bin:$PATH"
+ PATH="${_eprefix}/usr/$x/distcc/bin:$PATH"
[[ -n $DISTCC_LOG ]] && addwrite "${DISTCC_LOG%/*}"
fi
if has ccache $FEATURES ; then
- PATH="/usr/$x/ccache/bin:$PATH"
+ PATH="${_eprefix}/usr/$x/ccache/bin:$PATH"
if [[ -n $CCACHE_DIR ]] ; then
addread "$CCACHE_DIR"
@@ -617,7 +619,7 @@ if ! has "$EBUILD_PHASE" clean cleanrm ; then
[[ -n $CCACHE_SIZE ]] && ccache -M $CCACHE_SIZE &> /dev/null
fi
- unset x
+ unset x _eprefix
if [[ -n $QA_PREBUILT ]] ; then