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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits))
(No client certificate requested)
by finch.gentoo.org (Postfix) with ESMTPS id 4389115808E
for ; Sun, 24 Apr 2022 12:52:32 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
by pigeon.gentoo.org (Postfix) with SMTP id 54755E075F;
Sun, 24 Apr 2022 12:52:31 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by pigeon.gentoo.org (Postfix) with ESMTPS id 101DBE075F
for ; Sun, 24 Apr 2022 12:52:31 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits))
(No client certificate requested)
by smtp.gentoo.org (Postfix) with ESMTPS id DC38E341886
for ; Sun, 24 Apr 2022 12:52:29 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
by oystercatcher.gentoo.org (Postfix) with ESMTP id 69B1C2F9
for ; Sun, 24 Apr 2022 12:52:28 +0000 (UTC)
From: "Ulrich Müller"
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller"
Message-ID: <1650804713.be55691ed16c2ab4dd7c3d635fc2bd67ecd6b563.ulm@gentoo>
Subject: [gentoo-commits] proj/devmanual:master commit in: eclass-writing/
X-VCS-Repository: proj/devmanual
X-VCS-Files: eclass-writing/text.xml
X-VCS-Directories: eclass-writing/
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: be55691ed16c2ab4dd7c3d635fc2bd67ecd6b563
X-VCS-Branch: master
Date: Sun, 24 Apr 2022 12:52:28 +0000 (UTC)
Precedence: bulk
List-Post:
List-Help:
List-Unsubscribe:
List-Subscribe:
List-Id: Gentoo Linux mail
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: a6a77193-811f-4246-8205-c5b173dfea70
X-Archives-Hash: a4b97bcff722dad2ae900ca9174a7198
commit: be55691ed16c2ab4dd7c3d635fc2bd67ecd6b563
Author: Thomas Bracht Laumann Jespersen laumann xyz>
AuthorDate: Fri Apr 15 21:42:03 2022 +0000
Commit: Ulrich Müller gentoo org>
CommitDate: Sun Apr 24 12:51:53 2022 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=be55691e
eclass-writing: doc inherit guards, EXPORT_FUNCTIONS warning
Add a section to explain what inherit guards are and their usage, and
add a "rule of thumb" to put EXPORT_FUNCTIONS at the end of eclasses for
max portability.
This turned into a larger re-ordering of the sections so the full jmake
example can showcase all the features discussed in the preceding
sections, like EAPI guard, inherit guard, and EXPORT_FUNCTIONS at the
very end.
Signed-off-by: Thomas Bracht Laumann Jespersen laumann.xyz>
Signed-off-by: Ulrich Müller gentoo.org>
eclass-writing/text.xml | 156 +++++++++++++++++++++++++++++++++++++-----------
1 file changed, 122 insertions(+), 34 deletions(-)
diff --git a/eclass-writing/text.xml b/eclass-writing/text.xml
index f0f03c0..22b973f 100644
--- a/eclass-writing/text.xml
+++ b/eclass-writing/text.xml
@@ -638,11 +638,11 @@ eclass-defined defaults for example, say we had fnord.eclass:
-EXPORT_FUNCTIONS src_compile
-
fnord_src_compile() {
do_stuff || die
}
+
+EXPORT_FUNCTIONS src_compile
@@ -659,6 +659,115 @@ src_compile() {
}
+
+Eclasses may inherit other eclasses to make use of their functionality, and
+historically there have been instances of eclasses calling
+EXPORT_FUNCTIONS and then inheriting another eclass. As inherited
+eclasses may also execute EXPORT_FUNCTIONS, it was not fully defined
+which defaults should take effect. The general recommendation is now that
+eclasses should not inherit other eclasses after calling
+EXPORT_FUNCTIONS.
+
+
+