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