diff options
Diffstat (limited to 'ebuild-writing/using-eclasses/text.xml')
-rw-r--r-- | ebuild-writing/using-eclasses/text.xml | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ebuild-writing/using-eclasses/text.xml b/ebuild-writing/using-eclasses/text.xml index 943e92d..7fa2c7b 100644 --- a/ebuild-writing/using-eclasses/text.xml +++ b/ebuild-writing/using-eclasses/text.xml @@ -1,7 +1,7 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <guide self="ebuild-writing/using-eclasses/"> <chapter> -<title>Using Eclasses</title> +<title>Using eclasses</title> <body> <p> @@ -14,15 +14,24 @@ how to use an eclass which has already been written. </body> <section> -<title>The <c>inherit</c> Function</title> +<title>The <c>inherit</c> function</title> <body> <p> To use an eclass, it must be 'inherited'. This is done via the <c>inherit</c> -function, which is provided by <c>ebuild.sh</c>. The <c>inherit</c> statement must -come at the top of the ebuild, <e>before</e> any functions. Conditional inherits are -illegal (except where the inheritance criteria are cache-constant <d/> see <uri -link="::general-concepts/portage-cache"/>). +function, which is provided by <c>ebuild.sh</c>. The <c>inherit</c> statement +must come at the top of the ebuild, <e>before</e> any functions. +Conditional inherits are 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> |