1 |
>>>>> On Mon, 16 Dec 2019, Michał Górny wrote: |
2 |
|
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 |
|
10 |
> Example 1: removing mirror restriction from files |
11 |
|
12 |
> RESTRICT="mirror" |
13 |
> SRC_URI="https://example.com/you-cant-mirror-this.tar.bz2 |
14 |
> mirror+https://example.com/but-you-can-mirror-this.tar.gz" |
15 |
|
16 |
> Example 2: removing fetch & mirror restriction from files |
17 |
|
18 |
> RESTRICT="fetch" |
19 |
> SRC_URI="https://example.com/you-cant-fetch-this.zip |
20 |
> mirror+https://example.com/but-you-can-mirror-this.tar.gz" |
21 |
|
22 |
> Example 3: removing fetch restriction while leaving mirror restriction |
23 |
|
24 |
> RESTRICT="fetch" |
25 |
> SRC_URI="https://example.com/you-cant-fetch-this.zip |
26 |
> fetch+https://example.com/you-cant-mirror-this.tar.bz2" |
27 |
|
28 |
Looks good, but what is slightly confusing is that it doesn't map |
29 |
one-to-one to the RESTRICT tokens: |
30 |
|
31 |
- RESTRICT="mirror" enables mirror restriction, and it is undone by |
32 |
"mirror+", as expected. |
33 |
|
34 |
- RESTRICT="fetch" enables both fetch and mirror restriction, but it is |
35 |
undone by "mirror+" as well, not by "fetch+" (which disables only |
36 |
fetch restriction). |
37 |
|
38 |
I had already asked this in bug 371413 [1], but is there an actual usage |
39 |
case for example 3? Because if there isn't, we might get away with only |
40 |
supporting "mirror+", which should be less error prone. |
41 |
|
42 |
Ulrich |
43 |
|
44 |
> [1] https://bugs.gentoo.org/371413 |