Open solsticedhiver opened 6 years ago
@solsticedhiver Happy to hear you are using the script. However, if that is the only line in your file with a deb
or deb-src
definition, it will not work.
apt-select
is meant to be a supplement to the mirror://
method in that it tests latency. It does not support generating a new sources.list
from scratch. The file generation is meant to replace existing mirror definitions with better ones. mirror://mirrors.ubuntu.com/mirrors.txt
is not actually a valid mirror because mirror
is not a supported scheme (see man sources.list
-> URI Specification, and the list of supported URI schemes in theREADME
). Please try using the script with mirror definitions line like:
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
Thanks!
Close duplicate to #3.
the sources.list contained only lines with mirror://
. It was generated by "Software and mirrors"
Look for yourself at the man page: The mirror protocol is a valid one in 'cosmic': http://manpages.ubuntu.com/manpages/cosmic/en/man5/sources.list.5.html#uri%20specification
It appaears to be a new thing because it does not show up in man page of previous release of ubuntu.
I don't see why you closed that bug without fixing it.
It is just a matter to adapt your script so that it takes into account the presence of mirror://
and replace with whatever you find as best.
@solsticedhiver ok so by “newer” you mean 18.10 cosmic. That is the only distribution that specifies mirror as a scheme.
According to the man page it represents the location of a mirror list so it wouldn’t make sense for apt-select
to assume that it should be replaced by some single http mirror.
I’m not sure what “Software and mirrors” is, but that’s irrelevant because apt-select
and mirror
scheme now conflict. The thing is, we now have a --country
argument that defaults to US. It was a result of a period where http://mirrors.ubuntu.com/mirrors.txt
was not dynamically generating a list of mirrors based on the machine's location (see #62).
OK. I understand.
But I don't see the big deal given that you create a new sources.list and do not replace the exisitng one. And why not replace a mirror://something with a http:// if the mirror given is bad and you get a better one with apt-select test ?
Reopening, because the confusion around the mirror
scheme is understandable, especially now that it's officially supported in 18.10. A section could probably be added to the README
explaining the differences in approaches and perhaps that mirror://mirrors.ubuntu.com/mirrors.txt
is not actually a mirror, which is one of the reasons why we ignore it.
Now that I think about it though, it might be a cool feature to detect mirror
schemed URIs and use them if no --country
definition were specified. But with that comes more scope and complexity like having to make decisions about:
mirror
only in 18.10 since that's the only officially supported distribution or support any list that defines it because it has been unofficially supported for a while now?mirrors.ubuntu.com/US.txt
)?--country
conflicts with a mirror
definition?mirror
URI, do we try to fetch each or error? If the former, now we have to union all sets of mirrors from the lists before testing them all, then prompt the user to choose a mirror for each definition. While we're supporting this, people might then ask why can't they specify a --country
argument for each suite and component?All worth exploring, but not a tiny amount of work and I'm quite busy these days.
With (newer ?) ubuntu release, one can use a mirror protocol that use directly the mirrors from mirrors.ubuntu.com
Tihs means lines in sources.list looks like this:
When this is set in sources.list, then
apt-select
bails out with the error: