diff options
author | Florian Schmaus <flo@geekplace.eu> | 2020-07-21 16:19:55 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2020-07-23 17:55:27 +0200 |
commit | e26dd425b928996b0775ee3a01ef73e0edc2a6fb (patch) | |
tree | 54db75a350494a90e37de3a0576f702c1f6ba63f /general-concepts/portage-cache | |
parent | keywording: Mention NATTkA (diff) | |
download | devmanual-e26dd425b928996b0775ee3a01ef73e0edc2a6fb.tar.gz devmanual-e26dd425b928996b0775ee3a01ef73e0edc2a6fb.tar.bz2 devmanual-e26dd425b928996b0775ee3a01ef73e0edc2a6fb.zip |
general-concepts/portage-cache: Update example for conditional inherit
The era of "-cvs" ebuilds is long gone (does anyone still remember
those?). Instead devmanual should show a contemporary example for
conditional eclass inheritance based on git live-ebuilds.
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
[Slightly simplified example.]
Closes: https://bugs.gentoo.org/733428
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'general-concepts/portage-cache')
-rw-r--r-- | general-concepts/portage-cache/text.xml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/general-concepts/portage-cache/text.xml b/general-concepts/portage-cache/text.xml index ba9c0fa..4839fa0 100644 --- a/general-concepts/portage-cache/text.xml +++ b/general-concepts/portage-cache/text.xml @@ -60,17 +60,22 @@ solely upon <c>PN</c> are allowed. <p> As an example of a legal and possibly useful conditional inherit, some eclasses -do: +or ebuilds do: </p> <codesample lang="ebuild"> -if [[ "${PN##*-}" == "cvs" ]] ; then - inherit cvs +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/devmanual.git" +else + SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz" + KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" fi </codesample> <p> -This allows the same eclass to be used for both regular and <c>-cvs</c> packages. +This allows the same eclass (or the same ebuild "template") to be used for both +regular and live packages. </p> </body> </section> |