From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C267A15808B for ; Wed, 16 Feb 2022 18:02:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13F52E0875; Wed, 16 Feb 2022 18:02:43 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DCCF9E0875 for ; Wed, 16 Feb 2022 18:02:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7CCE8343148 for ; Wed, 16 Feb 2022 18:02:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3382426D for ; Wed, 16 Feb 2022 18:02:38 +0000 (UTC) From: "Matthew Smith" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matthew Smith" Message-ID: <1645034536.aec6c83e31a883f9777198b45e8356660afb35d4.matthew@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/variables/ X-VCS-Repository: proj/devmanual X-VCS-Files: ebuild-writing/variables/text.xml X-VCS-Directories: ebuild-writing/variables/ X-VCS-Committer: matthew X-VCS-Committer-Name: Matthew Smith X-VCS-Revision: aec6c83e31a883f9777198b45e8356660afb35d4 X-VCS-Branch: master Date: Wed, 16 Feb 2022 18:02:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5554e7d3-913c-47c9-ad53-4e1052fe2b26 X-Archives-Hash: 4a808a3b503f7eaa4d76b239d2a1dc69 commit: aec6c83e31a883f9777198b45e8356660afb35d4 Author: Matthew Smith gentoo org> AuthorDate: Tue Feb 15 20:11:08 2022 +0000 Commit: Matthew Smith gentoo org> CommitDate: Wed Feb 16 18:02:16 2022 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=aec6c83e ebuild-writing/variables: Selectively lifting SRC_URI restrictions Closes: https://github.com/gentoo/devmanual/pull/271 Signed-off-by: Matthew Smith gentoo.org> ebuild-writing/variables/text.xml | 62 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) 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" - Third-party mirrors @@ -486,6 +485,67 @@ infrastructure; in that case, the benefit to using third-party mirror list does not outweigh the burden of maintaining it.

+ +
+ + + +Lifting restrictions + + +

+In EAPI 8, individual items in SRC_URI can be exempted from automatic +mirroring and fetching restrictions (imposed by RESTRICT="mirror" and +RESTRICT="fetch") by prefixing the addresses with mirror+ or +fetch+. For example, in the following ebuild, +

+ + +EAPI="8" + +SRC_URI="${P}.tar.gz + mirror+https://dev.gentoo.org/~larry/distfiles/${P}-addons.tar.gz" + +RESTRICT="fetch" + + +

+Portage will be prevented from trying to fetch ${P}.tar.gz as expected, +but the ${P}-patches.tar.gz file will be mirrored and fetched by Portage +without restriction. +

+ +

+The following table shows the effects of the prefixes when RESTRICT="mirror" and RESTRICT="fetch" are set: +

+ + + + + + + + + + + fetch & mirror + fetch & mirror + fetch & mirror + + + + fetch only + fetch only + fetch & mirror + + + + unfetchable + fetch only + fetch & mirror + +
(no prefix)fetch+mirror+
(no RESTRICT)
RESTRICT="mirror"
RESTRICT="fetch"
+