aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-12 20:50:39 +0000
committerUlrich Müller <ulm@gentoo.org>2021-03-30 11:11:07 +0200
commit2f0af8dd1db88444cefbc897d2ba929817fb56ba (patch)
treec0cd2a7b0b4d3f700bbdf1e8b7bd3ab1facbece7
parentebuild-writing/file-format: mention 99999999 as live for YYYYMMDD versions (diff)
downloaddevmanual-2f0af8dd.tar.gz
devmanual-2f0af8dd.tar.bz2
devmanual-2f0af8dd.zip
ebuild-writing/using-eclasses: mention sorting inherit arguments
Closes: https://github.com/gentoo/devmanual/pull/202 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--ebuild-writing/using-eclasses/text.xml9
1 files changed, 9 insertions, 0 deletions
diff --git a/ebuild-writing/using-eclasses/text.xml b/ebuild-writing/using-eclasses/text.xml
index 943e92d..e9e12fe 100644
--- a/ebuild-writing/using-eclasses/text.xml
+++ b/ebuild-writing/using-eclasses/text.xml
@@ -26,6 +26,15 @@ link="::general-concepts/portage-cache"/>).
</p>
<p>
+When using <c>inherit</c>, it is best practice to sort the arguments (eclasses)
+alphabetically. An exception is where the phases exported by an eclass are
+affected by subsequent arguments. For example, <c>multilib-minimal.eclass</c>
+mentions in its
+<uri link="::eclass-reference/multilib-minimal.eclass/">documentation</uri>
+that it should be inherited last because it overrides most phases.
+</p>
+
+<p>
After inheriting an eclass, its provided functions can be used as
normal. Here's an example ebuild, <c>foomatic-0.1-r2.ebuild</c>, which
uses three eclasses: