* [gentoo-commits] proj/devmanual:master commit in: general-concepts/portage-cache/
@ 2020-07-23 15:56 Ulrich Müller
0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Müller @ 2020-07-23 15:56 UTC (permalink / raw
To: gentoo-commits
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>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: general-concepts/portage-cache/
@ 2022-01-12 6:34 Ulrich Müller
0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Müller @ 2022-01-12 6:34 UTC (permalink / raw
To: gentoo-commits
commit: bd8a89afefff176b5f85a1e1e20632457994afd1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 12 04:50:00 2022 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 12 06:28:55 2022 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=bd8a89af
general-concepts/portage-cache: clarify phrasing (minor)
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
general-concepts/portage-cache/text.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/general-concepts/portage-cache/text.xml b/general-concepts/portage-cache/text.xml
index 4839fa0..a1394af 100644
--- a/general-concepts/portage-cache/text.xml
+++ b/general-concepts/portage-cache/text.xml
@@ -25,8 +25,8 @@ fi
</codesample>
<p>
-However, this is legal, since <c>eapi7-ver.eclass</c> works upon <c>PV</c>, and
-<c>PV</c> and <c>PN</c> are both static:
+However, the following is legal, since <c>eapi7-ver.eclass</c> works upon
+<c>PV</c>, <c>PV</c>, and <c>PN</c> are both static:
</p>
<codesample lang="ebuild">
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: general-concepts/portage-cache/
@ 2022-02-18 18:19 Sam James
0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-02-18 18:19 UTC (permalink / raw
To: gentoo-commits
commit: 5e91e851b96bc43a952870403194abcd7d7c52dd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 24 04:15:19 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 18:19:24 2022 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=5e91e851
general-concepts/portage-cache: add "metadata invariance" term
Signed-off-by: Sam James <sam <AT> gentoo.org>
Closes: https://github.com/gentoo/devmanual/pull/269
Signed-off-by: Sam James <sam <AT> gentoo.org>
general-concepts/portage-cache/text.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/general-concepts/portage-cache/text.xml b/general-concepts/portage-cache/text.xml
index a1394af..857cf6b 100644
--- a/general-concepts/portage-cache/text.xml
+++ b/general-concepts/portage-cache/text.xml
@@ -11,6 +11,11 @@ these variables must be either static or generated using only unchanging
'version / name' variables (<c>P</c>, <c>PN</c>, <c>PV</c>, <c>PR</c>, <c>PVR</c> and <c>PF</c>).
</p>
+<p>
+The cache, when generated, must be identical independent of the used machine
+or environment. This concept is referred to as <e>metadata invariance</e>.
+</p>
+
<p>
So, the following will not work:
</p>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: general-concepts/portage-cache/
@ 2024-09-14 19:11 Ulrich Müller
0 siblings, 0 replies; 4+ messages in thread
From: Ulrich Müller @ 2024-09-14 19:11 UTC (permalink / raw
To: gentoo-commits
commit: ba3631b0b62ec1d9912a77ed68db8505328953bb
Author: Sebastian Engel <sighunter <AT> gmx <DOT> de>
AuthorDate: Wed Aug 28 08:47:02 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Sep 14 19:10:58 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=ba3631b0
g-c/portage-cache: Refine the allowed variables for conditional inherits
Since the code example after the text uses PV to show allowed conditional
inherits, the preceding text should also mention that PV is valid.
Signed-off-by: Sebastian Engel <sighunter <AT> gmx.de>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
general-concepts/portage-cache/text.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/general-concepts/portage-cache/text.xml b/general-concepts/portage-cache/text.xml
index ad2b391..aaee0b9 100644
--- a/general-concepts/portage-cache/text.xml
+++ b/general-concepts/portage-cache/text.xml
@@ -58,7 +58,8 @@ fi
Because eclasses modify various cached variables, conditional inheritance is not
allowed except where the same results will always be obtained on every system.
For example, inherits based upon <c>USE</c> flags are illegal, but inherits based
-solely upon <c>PN</c> are allowed.
+solely upon the unchanging variables (e.g. <c>PV</c>) mentioned above are
+allowed.
</p>
<p>
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-14 19:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-12 6:34 [gentoo-commits] proj/devmanual:master commit in: general-concepts/portage-cache/ Ulrich Müller
-- strict thread matches above, loose matches on Subject: below --
2024-09-14 19:11 Ulrich Müller
2022-02-18 18:19 Sam James
2020-07-23 15:56 Ulrich Müller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox