Add in the ability to read in a list of PORTAGE_BINHOST from either the portage variable or a user specified https location, and sort them by speed.
Output should be a properly formatted PORTAGE_BINHOST="1 2 3" sent to stdout or /etc/portage/make.conf
I tested portage with multiple mirrors in the PORTAGE_BINHOST variable, and it appears to download from the first entry. It is advisable to write all the results in order, however, to make sure the next run of mirrorselect works as expected (since the second run would be operating using the PORTAGE_BINHOST written from the first run presumably)
Okay, so I just encountered an error where portage was pulling packages from the 2nd mirror in the list instead of the first. It did it over and over again. Please note there are 3 mirrors in my list right now, so I can't explain why portage picked not the first nor the last in the list, but the 2nd.
Clearly something is picking a mirror, no clue what. Switching to have one in the list, the first one, everything worked, so I'm pretty sure it's not failing on the first and retrying on the second.
Zac, any idea why that would be?
if it takes them from the first when it is the only one, that would rule out the use flag differences...
Maybe the fetch function is doing something wrong. The GENTOO_MIRRORS are added to the list here:
The list is reversed here, so that list.pop() is supposed to return GENTOO_MIRRORS from left to right:
(In reply to Zac Medico from comment #3)
> Maybe the fetch function is doing something wrong. The GENTOO_MIRRORS are
> added to the list here:
Sorry I thought we were talking about GENTOO_MIRRORS rather than PORTAGE_BINHOST.
The PORTAGE_BINHOST code has no notion of mirrors, if multiple binhosts contain identical files then it always fetches from the binhost listed furthest to the left in PORTAGE_BINHOST, since the one on the right overrides the one on the left here:
Considering the (what seems to me to be) confusing difference, can you please make PORTAGE_BINHOST work more like GENTOO_MIRRORS?
Trying things left to right instead of right to left would be a great start, and anything else you might thing a moron with 5 randomly rsyncing mirrors might need :-)
Also, I'm still looking for someone to actually implement support for PORTAGE_BINHOST in mirrorselect. :-D
Currently the binarytree class associates each package with a single BASE_URI and PKGINDEX_URI. In order to support mirrors, each package needs to be associated with a list of mirrors.
In order to express things like this, it would be helpful to have support for binary package repository configuration files. This will make it possible to
specify mirrors for a particular binary package repository.
Can revisit this now that binrepos.conf support is available (bug 668334).
For bug 668302 we added binrepos.conf support to allow customization of FETCHCOMMAND.