aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2018-05-16 13:35:57 -0700
committerZac Medico <zmedico@gentoo.org>2018-05-16 13:35:57 -0700
commit17fce85669beec41747d65b37a55747b2f3ddb3c (patch)
treea0c58af5f8d5f88e398633f0ce4c539efeae84ff
parentphase-helpers.sh: normalize has/best_version root more (cosmetic) (diff)
downloadportage-17fce85669beec41747d65b37a55747b2f3ddb3c.tar.gz
portage-17fce85669beec41747d65b37a55747b2f3ddb3c.tar.bz2
portage-17fce85669beec41747d65b37a55747b2f3ddb3c.zip
phase-helpers.sh: fix has/best_version for cross-prefix portageq (bug 655414)
When the portageq root argument refers to ${PORTAGE_OVERRIDE_EPREFIX}, also export a consistent ${EPREFIX}, since portageq asserts that the root argument ends with ${EPREFIX}. Bug: https://bugs.gentoo.org/655414
-rw-r--r--bin/phase-helpers.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 3e455d715..99a30a176 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -900,7 +900,10 @@ ___best_version_and_has_version_common() {
die "${FUNCNAME[1]}: option ${root_arg} is not supported with EAPI ${EAPI}"
fi
if ___eapi_has_prefix_variables; then
+ # Since portageq requires the root argument be consistent
+ # with EPREFIX, ensure consistency here (bug 655414).
root=/${PORTAGE_OVERRIDE_EPREFIX#/}
+ local -x EPREFIX=${PORTAGE_OVERRIDE_EPREFIX}
else
root=/
fi ;;