Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [EAPI 8 RFC] Selective fetch/mirror (un-)restriction
Date: Tue, 17 Dec 2019 15:21:31
Message-Id: ffc21e6c5ff8ec235a27fec5d91e1e02d27fbef5.camel@gentoo.org
In Reply to: Re: [gentoo-dev] [EAPI 8 RFC] Selective fetch/mirror (un-)restriction by Ulrich Mueller
1 On Mon, 2019-12-16 at 14:16 +0100, Ulrich Mueller wrote:
2 > > > > > > On Mon, 16 Dec 2019, Michał Górny wrote:
3 > > Proposed solution
4 > > =================
5 > > The current proposal is based on extending the current URI syntax to
6 > > permit excluding individual files from the restriction. The idea is to
7 > > prepend 'fetch+' to protocol to undo fetch restriction, or to prepend
8 > > 'mirror+' to undo fetch & mirror restrictions.
9 > > Example 1: removing mirror restriction from files
10 > > RESTRICT="mirror"
11 > > SRC_URI="https://example.com/you-cant-mirror-this.tar.bz2
12 > > mirror+https://example.com/but-you-can-mirror-this.tar.gz"
13 > > Example 2: removing fetch & mirror restriction from files
14 > > RESTRICT="fetch"
15 > > SRC_URI="https://example.com/you-cant-fetch-this.zip
16 > > mirror+https://example.com/but-you-can-mirror-this.tar.gz"
17 > > Example 3: removing fetch restriction while leaving mirror restriction
18 > > RESTRICT="fetch"
19 > > SRC_URI="https://example.com/you-cant-fetch-this.zip
20 > > fetch+https://example.com/you-cant-mirror-this.tar.bz2"
21 >
22 > Looks good, but what is slightly confusing is that it doesn't map
23 > one-to-one to the RESTRICT tokens:
24 >
25 > - RESTRICT="mirror" enables mirror restriction, and it is undone by
26 > "mirror+", as expected.
27 >
28 > - RESTRICT="fetch" enables both fetch and mirror restriction, but it is
29 > undone by "mirror+" as well, not by "fetch+" (which disables only
30 > fetch restriction).
31 >
32 > I had already asked this in bug 371413 [1], but is there an actual usage
33 > case for example 3? Because if there isn't, we might get away with only
34 > supporting "mirror+", which should be less error prone.
35 >
36
37 Does this really solve the problem? The labels are still the other way
38 around, except that you throw 'fetch+' away as invalid.
39
40 While at it, I'm wondering if 'mirror+mirror://foo' can be confusing.
41
42 --
43 Best regards,
44 Michał Górny

Attachments

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