1 |
On Thu, Jan 9, 2014 at 9:26 AM, Ben Kohler <bkohler@×××××.com> wrote: |
2 |
|
3 |
> |
4 |
> On Mon, Jan 6, 2014 at 2:20 PM, Robin H. Johnson <robbat2@g.o>wrote: |
5 |
> |
6 |
>> I would like to make it a directory instead of a single file, and extend |
7 |
>> the internal syntax. |
8 |
>> |
9 |
> I'm not sure I see much real value in allowing individual profiles to |
10 |
> add/remove mirrors from each group, to be honest. Maybe I'm just not |
11 |
> thinking of the right scenarios. |
12 |
> |
13 |
|
14 |
Ignorant question: Can overlays modify profile easily (if at all?) If not, |
15 |
then taking mirror lists out of profile seems rather sane, and would allow |
16 |
overlays to add their own mirrors. |
17 |
|
18 |
Spec thought: |
19 |
|
20 |
1. make.conf should define MIRROR_REGIONS, which is a space separated list |
21 |
of Region/Subregion/Locality strings (e.g. |
22 |
"north_america/united_states/texas europe/germany/düsseldorf"). |
23 |
2. Using the file layout as bkohler suggested (e.g. |
24 |
mirrors/{mirrorname,othermirrorname,thirdmirrorname}/{Asia,Europe}: |
25 |
mirrorname may be a file or a directory. If it is a directory, it may |
26 |
contain a file named "mirrorlist" if there are global mirrors, and it may |
27 |
contain any number of region-named files or directories. |
28 |
3. If a region-named "file" is a directory, then it must contain either a |
29 |
file mirrorlist if it has region-level mirrors, or files/directories for |
30 |
subregions. |
31 |
4. When emerge fetches a file, if the most specific region (of the first |
32 |
entry, if there are multiple entries) is not found, move up to the next |
33 |
greater-sized region (one directory up). If that region exists, then |
34 |
concatenate all of its subregions into the list to select a URL from. If it |
35 |
doesn't exist, move up another level, and again, if it is found, |
36 |
concatenate everything below it into the list of possible URLs. If the |
37 |
final top-level region isn't found, move to the next MIRROR_REGIONS entry, |
38 |
if it exists. Otherwise, concatenate every available region for that mirror |
39 |
into the list. |
40 |
|
41 |
This could all be done in a flat XML (or YAML, to avoid boilerplate) file, |
42 |
too. |