commit: 2f0af8dd1db88444cefbc897d2ba929817fb56ba Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Mar 12 20:50:39 2021 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Tue Mar 30 09:11:07 2021 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=2f0af8dd
ebuild-writing/using-eclasses: mention sorting inherit arguments Closes: https://github.com/gentoo/devmanual/pull/202 Signed-off-by: Sam James <sam <AT> gentoo.org> Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> ebuild-writing/using-eclasses/text.xml | 9 +++++++++ 1 file changed, 9 insertions(+) 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 @@ -25,6 +25,15 @@ illegal (except where the inheritance criteria are cache-constant <d/> see <uri 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
