commit:     daeb75b345c4433218ab9e7a5319e8914092f048
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 20 16:43:13 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Dec 22 00:07:32 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=daeb75b3

bin/ebuild-helpers/portageq: match against portage/bin/ebuild-helpers

In case PORTAGE_OVERRIDE_EPREFIX is modified in the environment,
the actual ebuild-helpers PATH will not match PORTAGE_OVERRIDE_EPREFIX.

Closes: https://github.com/gentoo/portage/pull/389
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/ebuild-helpers/portageq | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index b314bce9f..45fa85d86 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -13,7 +13,7 @@ set -f # in case ${PATH} contains any shell glob characters
 
 for path in ${PATH}; do
        [[ -x ${path}/${scriptname} ]] || continue
-       [[ ${path} == ${PORTAGE_OVERRIDE_EPREFIX}/usr/lib*/portage/* ]] && 
continue
+       [[ ${path} == */portage/*/ebuild-helpers* ]] && continue
        [[ ${path} == */._portage_reinstall_.* ]] && continue
        [[ ${path}/${scriptname} -ef ${scriptpath} ]] && continue
        PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} \

Reply via email to