Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/using-eclasses/
Date: Tue, 30 Mar 2021 09:11:15
Message-Id: 1617095467.2f0af8dd1db88444cefbc897d2ba929817fb56ba.ulm@gentoo
1 commit: 2f0af8dd1db88444cefbc897d2ba929817fb56ba
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 12 20:50:39 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 30 09:11:07 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=2f0af8dd
7
8 ebuild-writing/using-eclasses: mention sorting inherit arguments
9
10 Closes: https://github.com/gentoo/devmanual/pull/202
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
13
14 ebuild-writing/using-eclasses/text.xml | 9 +++++++++
15 1 file changed, 9 insertions(+)
16
17 diff --git a/ebuild-writing/using-eclasses/text.xml b/ebuild-writing/using-eclasses/text.xml
18 index 943e92d..e9e12fe 100644
19 --- a/ebuild-writing/using-eclasses/text.xml
20 +++ b/ebuild-writing/using-eclasses/text.xml
21 @@ -25,6 +25,15 @@ illegal (except where the inheritance criteria are cache-constant <d/> see <uri
22 link="::general-concepts/portage-cache"/>).
23 </p>
24
25 +<p>
26 +When using <c>inherit</c>, it is best practice to sort the arguments (eclasses)
27 +alphabetically. An exception is where the phases exported by an eclass are
28 +affected by subsequent arguments. For example, <c>multilib-minimal.eclass</c>
29 +mentions in its
30 +<uri link="::eclass-reference/multilib-minimal.eclass/">documentation</uri>
31 +that it should be inherited last because it overrides most phases.
32 +</p>
33 +
34 <p>
35 After inheriting an eclass, its provided functions can be used as
36 normal. Here's an example ebuild, <c>foomatic-0.1-r2.ebuild</c>, which