public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: general-concepts/portage-cache/
Date: Thu, 23 Jul 2020 15:56:38 +0000 (UTC)	[thread overview]
Message-ID: <1595519727.e26dd425b928996b0775ee3a01ef73e0edc2a6fb.ulm@gentoo> (raw)

commit:     e26dd425b928996b0775ee3a01ef73e0edc2a6fb
Author:     Florian Schmaus <flo <AT> geekplace <DOT> eu>
AuthorDate: Tue Jul 21 14:19:55 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Jul 23 15:55:27 2020 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e26dd425

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 <AT> geekplace.eu>
[Slightly simplified example.]
Closes: https://bugs.gentoo.org/733428
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 general-concepts/portage-cache/text.xml | 13 +++++++++----
 1 file 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>


             reply	other threads:[~2020-07-23 15:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 15:56 Ulrich Müller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-01-12  6:34 [gentoo-commits] proj/devmanual:master commit in: general-concepts/portage-cache/ Ulrich Müller
2022-02-18 18:19 Sam James
2024-09-14 19:11 Ulrich Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1595519727.e26dd425b928996b0775ee3a01ef73e0edc2a6fb.ulm@gentoo \
    --to=ulm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox