[gentoo-portage-dev] [PATCH v2 2/2] ebuild.sh: Update QA notice in inherit()

2021-08-30 Thread Ulrich Müller
Bug: https://bugs.gentoo.org/399039
Signed-off-by: Ulrich Müller 
---
 bin/ebuild.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 1bca2c965..3042e6c8c 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -248,8 +248,8 @@ inherit() {
# 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)."
+   eqawarn "For compatibility with PMS and to avoid 
breakage with Pkgcore, only call"
+   eqawarn "EXPORT_FUNCTIONS after inherit(s). Portage 
behavior may change in future."
fi
fi
 
-- 
2.33.0




[gentoo-portage-dev] [PATCH v2 1/2] Revert "Revert "Generate a QA Notice when EXPORT_FUNCTIONS is called before inherit""

2021-08-30 Thread Ulrich Müller
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 
---
 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
-- 
2.33.0