commit: 1d1a20f48f5f37316b7827428e95714137078ea1 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Wed May 16 17:25:56 2018 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Wed May 16 17:32:20 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=1d1a20f4
phase-helpers.sh: normalize has/best_version root more (cosmetic) This eliminates a double slash when ${EPREFIX} is non-empty, though it's only a cosmetic fix since both portageq and QueryCommand normalize the root argument. Fixes: 9abebd3e6aae ("phase-helpers.sh: fix ROOT overrides for has/best_version (bug 655860)") Reported-by: Douglas Freed <dwfreed <AT> mtu.edu> Reported-by: Michał Górny <mgorny <AT> gentoo.org> bin/phase-helpers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 9163ef014..3e455d715 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -891,7 +891,7 @@ ___best_version_and_has_version_common() { case ${root_arg} in "") if ___eapi_has_prefix_variables; then - root=${ROOT%/}/${EPREFIX} + root=${ROOT%/}/${EPREFIX#/} else root=${ROOT} fi ;; @@ -910,7 +910,7 @@ ___best_version_and_has_version_common() { fi if ___eapi_has_prefix_variables; then case ${root_arg} in - -r) root=${ROOT%/}/${EPREFIX} ;; + -r) root=${ROOT%/}/${EPREFIX#/} ;; -d) root=${ESYSROOT} ;; -b) root=${BROOT:-/} ;; esac