diff options
author | Michael Haubenwallner <haubi@gentoo.org> | 2018-07-03 10:49:01 +0200 |
---|---|---|
committer | Michael Haubenwallner <haubi@gentoo.org> | 2018-07-03 10:49:01 +0200 |
commit | 96b0650dfe6ec38d1c02541d20b0adaf492032d9 (patch) | |
tree | fadd8b592f6de39117756f49505a571d1887b18b /eclass/python-utils-r1.eclass | |
parent | dev-libs/libgpg-error: fix yat2m dep bug with Cygwin (diff) | |
download | prefix-96b0650dfe6ec38d1c02541d20b0adaf492032d9.tar.gz prefix-96b0650dfe6ec38d1c02541d20b0adaf492032d9.tar.bz2 prefix-96b0650dfe6ec38d1c02541d20b0adaf492032d9.zip |
python-utils-r1.eclass: switch to stacked-prefix feature
USE=prefix-chain now is FEATURES=stacked-prefix
Bug: https://bugs.gentoo.org/658572
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index ed84c2680c..6a70453cbe 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -388,36 +388,24 @@ python_export() { PYTHON) export PYTHON=${EPREFIX}/usr/bin/${impl} if [[ " python jython pypy pypy3 " != *" ${PN} "* ]] \ - && [[ ! -x ${PYTHON} ]] \ - && use prefix-chain; then - # Need to search in parent prefixes - local parent - local parents=() - IFS=: eval 'parents=(${PORTAGE_READONLY_EPREFIXES})' - for parent in "${parents[@]}"; do - if [[ -x ${parent}/usr/bin/${impl} ]]; then - PYTHON=${parent}/usr/bin/${impl} - break - fi - done + && [[ ! -x ${EPREFIX}/usr/bin/${impl} ]] \ + && has stacked-prefix ${FEATURES}; then + # Need to look in build prefix + if [[ -x ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/bin/${impl} ]]; then + PYTHON=${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/bin/${impl} + fi fi debug-print "${FUNCNAME}: PYTHON = ${PYTHON}" ;; PYTHON_EPREFIX) export PYTHON_EPREFIX=${EPREFIX} if [[ " python jython pypy pypy3 " != *" ${PN} "* ]] \ - && [[ ! -x ${PYTHON_EPREFIX}/usr/bin/${impl} ]] \ - && use prefix-chain; then - # Need to search in parent prefixes - local parent - local parents=() - IFS=: eval 'parents=(${PORTAGE_READONLY_EPREFIXES})' - for parent in "${parents[@]}"; do - if [[ -x ${parent}/usr/bin/${impl} ]]; then - PYTHON_EPREFIX=${parent} - break - fi - done + && [[ ! -x ${EPREFIX}/usr/bin/${impl} ]] \ + && has stacked-prefix ${FEATURES}; then + # Need to look in build prefix + if [[ -x ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/bin/${impl} ]]; then + PYTHON_EPREFIX=${BROOT-${PORTAGE_OVERRIDE_EPREFIX}} + fi fi debug-print "${FUNCNAME}: PYTHON_EPREFIX = ${PYTHON_EPREFIX}" ;; @@ -531,18 +519,12 @@ python_export() { local dir export PYTHON_SCRIPTDIR=${EPREFIX}/usr/lib/python-exec/${impl} if [[ " python jython pypy pypy3 " != *" ${PN} "* ]] \ - && [[ ! -d ${PYTHON_SCRIPTDIR} ]] \ - && use prefix-chain; then - # Need to search in parent prefixes - local parent - local parents=() - IFS=: eval 'parents=(${PORTAGE_READONLY_EPREFIXES})' - for parent in "${parents[@]}"; do - if [[ -e ${parent}/usr/lib/python-exec/${impl} ]]; then - PYTHON_SCRIPTDIR=${parent}/usr/lib/python-exec/${impl} - break - fi - done + && [[ ! -x ${EPREFIX}/usr/bin/${impl} ]] \ + && has stacked-prefix ${FEATURES}; then + # Need to look in build prefix + if [[ -x ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/bin/${impl} ]]; then + PYTHON_SCRIPTDIR=${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/lib/python-exec/${impl} + fi fi debug-print "${FUNCNAME}: PYTHON_SCRIPTDIR = ${PYTHON_SCRIPTDIR}" ;; |