From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CAE4D1580B1 for ; Mon, 30 Aug 2021 06:22:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E45F1E08A2; Mon, 30 Aug 2021 06:22:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 69A2DE08A2 for ; Mon, 30 Aug 2021 06:22:57 +0000 (UTC) From: =?UTF-8?q?Ulrich=20M=C3=BCller?= To: gentoo-portage-dev@lists.gentoo.org Cc: =?UTF-8?q?Ulrich=20M=C3=BCller?= Subject: [gentoo-portage-dev] [PATCH v2 1/2] Revert "Revert "Generate a QA Notice when EXPORT_FUNCTIONS is called before inherit"" Date: Mon, 30 Aug 2021 08:22:10 +0200 Message-Id: <20210830062209.6422-1-ulm@gentoo.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 7fc26c2a-7227-48d1-9d73-4f3f99d7a74e X-Archives-Hash: ea630e218c7f05f84fb44efc1e2ce9b0 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