Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] [EAPI 8 RFC] Selective fetch/mirror (un-)restriction
Date: Mon, 16 Dec 2019 12:39:13
Message-Id: 293656848f42786552da59ad307058d597efa026.camel@gentoo.org
1 Hello, everyone.
2
3 I'd like to start a series of mails dedicated to features proposed for
4 including in EAPI 8. For a start, I'd like to discuss the topic of
5 selective fetch restriction [1]. It has been discussed at least in 2013
6 [2], and since it's finally got chance to be included, I think it's
7 worthwhile to rehash it.
8
9
10 The problem
11 ===========
12 Fetch/mirror restriction as of now can only be applied to all distfiles
13 at once. This causes problems in the (rather rare) case when we'd like
14 to add some additional files to SRC_URI that do not require the big
15 restriction. As a result, the user is forced to manually fetch all
16 the files even if only one truly requires it.
17
18
19 Proposed solution
20 =================
21 The current proposal is based on extending the current URI syntax to
22 permit excluding individual files from the restriction. The idea is to
23 prepend 'fetch+' to protocol to undo fetch restriction, or to prepend
24 'mirror+' to undo fetch & mirror restrictions.
25
26 Example 1: removing mirror restriction from files
27
28 RESTRICT="mirror"
29 SRC_URI="https://example.com/you-cant-mirror-this.tar.bz2
30 mirror+https://example.com/but-you-can-mirror-this.tar.gz"
31
32 Example 2: removing fetch & mirror restriction from files
33
34 RESTRICT="fetch"
35 SRC_URI="https://example.com/you-cant-fetch-this.zip
36 mirror+https://example.com/but-you-can-mirror-this.tar.gz"
37
38 Example 3: removing fetch restriction while leaving mirror restriction
39
40 RESTRICT="fetch"
41 SRC_URI="https://example.com/you-cant-fetch-this.zip
42 fetch+https://example.com/you-cant-mirror-this.tar.bz2"
43
44
45 Comments
46 ========
47 WDYT?
48
49
50 References
51 ==========
52 [1] https://bugs.gentoo.org/371413
53 [2] https://archives.gentoo.org/gentoo-dev/message/b0823618d5d3cc61bbed1e88dc2f144d
54
55 --
56 Best regards,
57 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies