1 |
Use local -x ECLASS. |
2 |
|
3 |
Bug: https://bugs.gentoo.org/656354 |
4 |
Bug: https://bugs.gentoo.org/676014 |
5 |
|
6 |
Signed-off-by: Zac Medico <zmedico@g.o> |
7 |
--- |
8 |
bin/ebuild.sh | 26 ++++++++++---------------- |
9 |
1 file changed, 10 insertions(+), 16 deletions(-) |
10 |
|
11 |
diff --git a/bin/ebuild.sh b/bin/ebuild.sh |
12 |
index 820db50ca..64041dff9 100755 |
13 |
--- a/bin/ebuild.sh |
14 |
+++ b/bin/ebuild.sh |
15 |
@@ -242,21 +242,13 @@ inherit() { |
16 |
debug-print "*** Multiple Inheritence (Level: ${ECLASS_DEPTH})" |
17 |
fi |
18 |
|
19 |
- if [[ -n $ECLASS && -n ${!__export_funcs_var} ]] ; then |
20 |
- echo "QA Notice: EXPORT_FUNCTIONS is called before inherit in" \ |
21 |
- "$ECLASS.eclass. For compatibility with <=portage-2.1.6.7," \ |
22 |
- "only call EXPORT_FUNCTIONS after inherit(s)." \ |
23 |
- | fmt -w 75 | while read -r ; do eqawarn "$REPLY" ; done |
24 |
- fi |
25 |
- |
26 |
local repo_location |
27 |
local location |
28 |
local potential_location |
29 |
local x |
30 |
|
31 |
# These variables must be restored before returning. |
32 |
- local PECLASS=$ECLASS |
33 |
- local prev_export_funcs_var=$__export_funcs_var |
34 |
+ local -x ECLASS |
35 |
|
36 |
local B_IUSE |
37 |
local B_REQUIRED_USE |
38 |
@@ -265,11 +257,19 @@ inherit() { |
39 |
local B_PDEPEND |
40 |
local B_HDEPEND |
41 |
local B_BDEPEND |
42 |
+ |
43 |
+ if [[ -n ${ECLASS} && -n ${!__export_funcs_var} ]] ; then |
44 |
+ echo "QA Notice: EXPORT_FUNCTIONS is called before inherit in" \ |
45 |
+ "${ECLASS}.eclass. For compatibility with <=portage-2.1.6.7," \ |
46 |
+ "only call EXPORT_FUNCTIONS after inherit(s)." \ |
47 |
+ | fmt -w 75 | while read -r ; do eqawarn "${REPLY}" ; done |
48 |
+ fi |
49 |
+ |
50 |
while [ "$1" ]; do |
51 |
location="" |
52 |
potential_location="" |
53 |
|
54 |
- export ECLASS="$1" |
55 |
+ ECLASS="$1" |
56 |
__export_funcs_var=__export_functions_$ECLASS_DEPTH |
57 |
unset $__export_funcs_var |
58 |
|
59 |
@@ -379,12 +379,6 @@ inherit() { |
60 |
shift |
61 |
done |
62 |
((--ECLASS_DEPTH)) # Returns 1 when ECLASS_DEPTH reaches 0. |
63 |
- if (( ECLASS_DEPTH > 0 )) ; then |
64 |
- export ECLASS=$PECLASS |
65 |
- __export_funcs_var=$prev_export_funcs_var |
66 |
- else |
67 |
- unset ECLASS __export_funcs_var |
68 |
- fi |
69 |
return 0 |
70 |
} |
71 |
|
72 |
-- |
73 |
2.18.1 |