diff options
author | 2022-02-15 20:11:08 +0000 | |
---|---|---|
committer | 2022-02-16 18:02:16 +0000 | |
commit | aec6c83e31a883f9777198b45e8356660afb35d4 (patch) | |
tree | abb39708d0f49b850edf13719b3089d0d136d7f0 /ebuild-writing | |
parent | devbook.rnc: Change from DTD to RELAX NG compact schema (diff) | |
download | devmanual-aec6c83e31a883f9777198b45e8356660afb35d4.tar.gz devmanual-aec6c83e31a883f9777198b45e8356660afb35d4.tar.bz2 devmanual-aec6c83e31a883f9777198b45e8356660afb35d4.zip |
ebuild-writing/variables: Selectively lifting SRC_URI restrictions
Closes: https://github.com/gentoo/devmanual/pull/271
Signed-off-by: Matthew Smith <matthew@gentoo.org>
Diffstat (limited to 'ebuild-writing')
-rw-r--r-- | ebuild-writing/variables/text.xml | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/ebuild-writing/variables/text.xml b/ebuild-writing/variables/text.xml index e45794d..41976b2 100644 --- a/ebuild-writing/variables/text.xml +++ b/ebuild-writing/variables/text.xml @@ -431,7 +431,6 @@ SRC_URI="https://example.com/files/${PV}.tar.gz -> ${P}.tar.gz" </body> </subsection> - <subsection> <title>Third-party mirrors</title> <body> @@ -488,6 +487,67 @@ list does not outweigh the burden of maintaining it. </body> </subsection> + + +<subsection> +<title>Lifting restrictions</title> +<body> + +<p> +In EAPI 8, individual items in <c>SRC_URI</c> can be exempted from automatic +mirroring and fetching restrictions (imposed by <c>RESTRICT="mirror"</c> and +<c>RESTRICT="fetch"</c>) by prefixing the addresses with <c>mirror+</c> or +<c>fetch+</c>. For example, in the following ebuild, +</p> + +<codesample lang="ebuild"> +EAPI="8" + +SRC_URI="${P}.tar.gz + mirror+https://dev.gentoo.org/~larry/distfiles/${P}-addons.tar.gz" + +RESTRICT="fetch" +</codesample> + +<p> +Portage will be prevented from trying to fetch <c>${P}.tar.gz</c> as expected, +but the <c>${P}-patches.tar.gz</c> file will be mirrored and fetched by Portage +without restriction. +</p> + +<p> +The following table shows the effects of the prefixes when <c>RESTRICT="mirror"</c> and <c>RESTRICT="fetch"</c> are set: +</p> + +<table> +<tr> + <th></th> + <th><e>(no prefix)</e></th> + <th><c>fetch+</c></th> + <th><c>mirror+</c></th> +</tr> +<tr> + <th><e>(no RESTRICT)</e></th> + <ti>fetch & mirror</ti> + <ti>fetch & mirror</ti> + <ti>fetch & mirror</ti> +</tr> +<tr> + <th><c>RESTRICT="mirror"</c></th> + <ti>fetch only</ti> + <ti>fetch only</ti> + <ti>fetch & mirror</ti> +</tr> +<tr> + <th><c>RESTRICT="fetch"</c></th> + <ti>unfetchable</ti> + <ti>fetch only</ti> + <ti>fetch & mirror</ti> +</tr> +</table> + +</body> +</subsection> </section> <section> |