On Thu, Jan 9, 2014 at 9:26 AM, Ben Kohler <bkoh...@gmail.com> wrote:

>
> On Mon, Jan 6, 2014 at 2:20 PM, Robin H. Johnson <robb...@gentoo.org>wrote:
>
>> I would like to make it a directory instead of a single file, and extend
>> the internal syntax.
>>
> I'm not sure I see much real value in allowing individual profiles to
> add/remove mirrors from each group, to be honest.  Maybe I'm just not
> thinking of the right scenarios.
>

Ignorant question: Can overlays modify profile easily (if at all?) If not,
then taking mirror lists out of profile seems rather sane, and would allow
overlays to add their own mirrors.

Spec thought:

1. make.conf should define MIRROR_REGIONS, which is a space separated list
of Region/Subregion/Locality strings (e.g.
"north_america/united_states/texas europe/germany/düsseldorf").
2. Using the file layout as bkohler suggested (e.g.
mirrors/{mirrorname,othermirrorname,thirdmirrorname}/{Asia,Europe}:
mirrorname may be a file or a directory. If it is a directory, it may
contain a file named "mirrorlist" if there are global mirrors, and it may
contain any number of region-named files or directories.
3. If a region-named "file" is a directory, then it must contain either a
file mirrorlist if it has region-level mirrors, or files/directories for
subregions.
4. When emerge fetches a file, if the most specific region (of the first
entry, if there are multiple entries) is not found, move up to the next
greater-sized region (one directory up). If that region exists, then
concatenate all of its subregions into the list to select a URL from. If it
doesn't exist, move up another level, and again, if it is found,
concatenate everything below it into the list of possible URLs. If the
final top-level region isn't found, move to the next MIRROR_REGIONS entry,
if it exists. Otherwise, concatenate every available region for that mirror
into the list.

This could all be done in a flat XML (or YAML, to avoid boilerplate) file,
too.

Reply via email to