1 |
commit: c401d1781c5cc2945e8a7234716ad1c4f1b03ed3 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 30 06:22:10 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 3 11:32:10 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c401d178 |
7 |
|
8 |
Revert "Revert "Generate a QA Notice when EXPORT_FUNCTIONS is called before inherit"" |
9 |
|
10 |
Reinstate the QA notice, because Portage behavior deviates from PMS, |
11 |
and breakage of eclasses with Pkgcore has been observed recently. |
12 |
|
13 |
This reverts commit f44d32550861cb25c209ef61dcd7ae1aa230da1f. |
14 |
|
15 |
Bug: https://bugs.gentoo.org/399039 |
16 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
17 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
18 |
|
19 |
bin/ebuild.sh | 8 ++++++++ |
20 |
1 file changed, 8 insertions(+) |
21 |
|
22 |
diff --git a/bin/ebuild.sh b/bin/ebuild.sh |
23 |
index 5916bedfc..1bca2c965 100755 |
24 |
--- a/bin/ebuild.sh |
25 |
+++ b/bin/ebuild.sh |
26 |
@@ -243,6 +243,14 @@ inherit() { |
27 |
ECLASS_DEPTH=$(($ECLASS_DEPTH + 1)) |
28 |
if [[ ${ECLASS_DEPTH} -gt 1 ]]; then |
29 |
debug-print "*** Multiple Inheritence (Level: ${ECLASS_DEPTH})" |
30 |
+ |
31 |
+ # Since ECLASS_DEPTH > 1, the following variables are locals from the |
32 |
+ # previous inherit call in the call stack. |
33 |
+ if [[ -n ${ECLASS} && -n ${!__export_funcs_var} ]] ; then |
34 |
+ eqawarn "QA Notice: EXPORT_FUNCTIONS is called before inherit in ${ECLASS}.eclass." |
35 |
+ eqawarn "For compatibility with <=portage-2.1.6.7, only call EXPORT_FUNCTIONS" |
36 |
+ eqawarn "after inherit(s)." |
37 |
+ fi |
38 |
fi |
39 |
|
40 |
local -x ECLASS |