public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download: 
* [gentoo-portage-dev] [PATCH v2 1/2] Revert "Revert "Generate a QA Notice when EXPORT_FUNCTIONS is called before inherit""
  @ 2021-08-30  6:22 99% ` Ulrich Müller
  0 siblings, 0 replies; 1+ results
From: Ulrich Müller @ 2021-08-30  6:22 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: 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 <ulm@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
-- 
2.33.0



^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-08-30  5:42     [gentoo-portage-dev] [PATCH 2/2] ebuild.sh: Update QA notice in inherit() Michał Górny
2021-08-30  6:22 99% ` [gentoo-portage-dev] [PATCH v2 1/2] Revert "Revert "Generate a QA Notice when EXPORT_FUNCTIONS is called before inherit"" Ulrich Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox