summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/phase-helpers.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 8a2f381c3..a47064e37 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -600,11 +600,13 @@ _eapi4_src_install() {
# Takes single depend-type atoms.
has_version() {
+ local eroot=${EROOT}
+ case "$EAPI" in 0|1|2) eroot=${ROOT} ;; esac
if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
- "$PORTAGE_BIN_PATH"/ebuild-ipc has_version "$ROOT" "$1"
+ "$PORTAGE_BIN_PATH"/ebuild-ipc has_version "${eroot}" "$1"
else
PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
- "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" has_version "${ROOT}" "$1"
+ "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" has_version "${eroot}" "$1"
fi
local retval=$?
case "${retval}" in
@@ -621,11 +623,13 @@ has_version() {
# Takes single depend-type atoms.
best_version() {
+ local eroot=${EROOT}
+ case "$EAPI" in 0|1|2) eroot=${ROOT} ;; esac
if [[ -n $PORTAGE_IPC_DAEMON ]] ; then
- "$PORTAGE_BIN_PATH"/ebuild-ipc best_version "$ROOT" "$1"
+ "$PORTAGE_BIN_PATH"/ebuild-ipc best_version "${eroot}" "$1"
else
PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
- "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" best_version "${ROOT}" "$1"
+ "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" best_version "${eroot}" "$1"
fi
local retval=$?
case "${retval}" in