Gentoo Archives: gentoo-commits

From: Michael Haubenwallner <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: eclass/
Date: Tue, 03 Jul 2018 08:52:52
Message-Id: 1530607741.96b0650dfe6ec38d1c02541d20b0adaf492032d9.haubi@gentoo
1 commit: 96b0650dfe6ec38d1c02541d20b0adaf492032d9
2 Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 3 08:49:01 2018 +0000
4 Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 3 08:49:01 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=96b0650d
7
8 python-utils-r1.eclass: switch to stacked-prefix feature
9
10 USE=prefix-chain now is FEATURES=stacked-prefix
11 Bug: https://bugs.gentoo.org/658572
12
13 eclass/python-utils-r1.eclass | 54 +++++++++++++++----------------------------
14 1 file changed, 18 insertions(+), 36 deletions(-)
15
16 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
17 index ed84c2680c..6a70453cbe 100644
18 --- a/eclass/python-utils-r1.eclass
19 +++ b/eclass/python-utils-r1.eclass
20 @@ -388,36 +388,24 @@ python_export() {
21 PYTHON)
22 export PYTHON=${EPREFIX}/usr/bin/${impl}
23 if [[ " python jython pypy pypy3 " != *" ${PN} "* ]] \
24 - && [[ ! -x ${PYTHON} ]] \
25 - && use prefix-chain; then
26 - # Need to search in parent prefixes
27 - local parent
28 - local parents=()
29 - IFS=: eval 'parents=(${PORTAGE_READONLY_EPREFIXES})'
30 - for parent in "${parents[@]}"; do
31 - if [[ -x ${parent}/usr/bin/${impl} ]]; then
32 - PYTHON=${parent}/usr/bin/${impl}
33 - break
34 - fi
35 - done
36 + && [[ ! -x ${EPREFIX}/usr/bin/${impl} ]] \
37 + && has stacked-prefix ${FEATURES}; then
38 + # Need to look in build prefix
39 + if [[ -x ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/bin/${impl} ]]; then
40 + PYTHON=${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/bin/${impl}
41 + fi
42 fi
43 debug-print "${FUNCNAME}: PYTHON = ${PYTHON}"
44 ;;
45 PYTHON_EPREFIX)
46 export PYTHON_EPREFIX=${EPREFIX}
47 if [[ " python jython pypy pypy3 " != *" ${PN} "* ]] \
48 - && [[ ! -x ${PYTHON_EPREFIX}/usr/bin/${impl} ]] \
49 - && use prefix-chain; then
50 - # Need to search in parent prefixes
51 - local parent
52 - local parents=()
53 - IFS=: eval 'parents=(${PORTAGE_READONLY_EPREFIXES})'
54 - for parent in "${parents[@]}"; do
55 - if [[ -x ${parent}/usr/bin/${impl} ]]; then
56 - PYTHON_EPREFIX=${parent}
57 - break
58 - fi
59 - done
60 + && [[ ! -x ${EPREFIX}/usr/bin/${impl} ]] \
61 + && has stacked-prefix ${FEATURES}; then
62 + # Need to look in build prefix
63 + if [[ -x ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/bin/${impl} ]]; then
64 + PYTHON_EPREFIX=${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}
65 + fi
66 fi
67 debug-print "${FUNCNAME}: PYTHON_EPREFIX = ${PYTHON_EPREFIX}"
68 ;;
69 @@ -531,18 +519,12 @@ python_export() {
70 local dir
71 export PYTHON_SCRIPTDIR=${EPREFIX}/usr/lib/python-exec/${impl}
72 if [[ " python jython pypy pypy3 " != *" ${PN} "* ]] \
73 - && [[ ! -d ${PYTHON_SCRIPTDIR} ]] \
74 - && use prefix-chain; then
75 - # Need to search in parent prefixes
76 - local parent
77 - local parents=()
78 - IFS=: eval 'parents=(${PORTAGE_READONLY_EPREFIXES})'
79 - for parent in "${parents[@]}"; do
80 - if [[ -e ${parent}/usr/lib/python-exec/${impl} ]]; then
81 - PYTHON_SCRIPTDIR=${parent}/usr/lib/python-exec/${impl}
82 - break
83 - fi
84 - done
85 + && [[ ! -x ${EPREFIX}/usr/bin/${impl} ]] \
86 + && has stacked-prefix ${FEATURES}; then
87 + # Need to look in build prefix
88 + if [[ -x ${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/bin/${impl} ]]; then
89 + PYTHON_SCRIPTDIR=${BROOT-${PORTAGE_OVERRIDE_EPREFIX}}/usr/lib/python-exec/${impl}
90 + fi
91 fi
92 debug-print "${FUNCNAME}: PYTHON_SCRIPTDIR = ${PYTHON_SCRIPTDIR}"
93 ;;