Multiple entries of same server in custom-mirrors.json
Created by: petsam
In interactive mode, mirrors with more than 1 protocol are entered multiple times in custom-mirrors.json
In the window that presents selectable mirrors the server are listed for as many protocols they support
If a user selects the same server in more than one of its protocols pacman-mirrors
writes them in custom-mirrors.json
as many times in exactly the same entries.
Thus they are polled those many times whenever a poll is needed.
When an -f command or similar is executed, it takes these several times the same mirror from custom-mirrors.json
to poll.
So it assumes as they are different mirrors and at the end it sorts and writes them all in the mirrorlist
, depending of course the response time.
It is a fact that the same server responds in random speeds (milliseconds) at polls, so it is not ordered in the mirrorlist in sequence.
sudo pacman-mirrors -aS testing
... ...
0.589 Greece : https://ftp.cc.uoc.gr/mirrors/linux/manjaro/
0.347 Greece : http://ftp.cc.uoc.gr/mirrors/linux/manjaro/
1.757 Greece : ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/
1.394 Greece : https://ftp.cc.uoc.gr/mirrors/linux/manjaro/
0.283 Greece : http://ftp.cc.uoc.gr/mirrors/linux/manjaro/
1.508 Greece : ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/
0.362 Greece : https://ftp.cc.uoc.gr/mirrors/linux/manjaro/
0.244 Greece : http://ftp.cc.uoc.gr/mirrors/linux/manjaro/
..... Greece : ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/
... ...
0.354 Netherlands : http://ftp.snt.utwente.nl/pub/linux/manjaro/
1.347 Netherlands : ftp://ftp.snt.utwente.nl/pub/linux/manjaro/
..... Netherlands : http://ftp.snt.utwente.nl/pub/linux/manjaro/
1.414 Netherlands : ftp://ftp.snt.utwente.nl/pub/linux/manjaro/
1.111 Netherlands : https://ftp.nluug.nl/pub/os/Linux/distr/manjaro/
1.326 Netherlands : ftp://ftp.nluug.nl/pub/os/Linux/distr/manjaro/
0.684 Netherlands : https://ftp.nluug.nl/pub/os/Linux/distr/manjaro/
1.280 Netherlands : ftp://ftp.nluug.nl/pub/os/Linux/distr/manjaro/
... ...
0.801 Sweden : https://ftp.lysator.liu.se/pub/manjaro/
1.142 Sweden : ftp://ftp.lysator.liu.se/pub/manjaro/
0.680 Sweden : https://ftp.lysator.liu.se/pub/manjaro/
..... Sweden : ftp://ftp.lysator.liu.se/pub/manjaro/
0.363 Turkey : http://ftp.linux.org.tr/manjaro/
0.946 Turkey : ftp://ftp.linux.org.tr/manjaro/
0.411 Turkey : http://ftp.linux.org.tr/manjaro/
0.956 Turkey : ftp://ftp.linux.org.tr/manjaro/
... ...
The Greek mirror as an example
- In
custom-mirrors.json
{
"country": "Greece",
"protocols": [
"https",
"http",
"ftp"
],
"url": "ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/"
},
{
"country": "Greece",
"protocols": [
"https",
"http",
"ftp"
],
"url": "ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/"
},
{
"country": "Greece",
"protocols": [
"https",
"http",
"ftp"
],
"url": "ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/"
},
- In
/var/lib/pacman-mirrors/status.json
{
"branches": [
1,
0,
0
],
"country": "Greece",
"last_sync": "10:45",
"protocols": [
"ftp",
"http",
"https"
],
"url": "https://ftp.cc.uoc.gr/mirrors/linux/manjaro/"
},
- In
/usr/share/pacman-mirrors/mirrors.json
{"country": "Greece", "url": "https://ftp.cc.uoc.gr/mirrors/linux/manjaro/", "protocols": ["ftp", "http", "https"]},
- In
/etc/pacman.d/mirrorlist
in 25th place
## Country : Greece
Server = ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/x32-testing/$repo/$arch
in 29th place
## Country : Greece
Server = ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/x32-testing/$repo/$arch
in 36th place
## Country : Greece
Server = ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/x32-testing/$repo/$arch
-
pacman-mirrors -aG
x32-testing -
sudo pacman-mirrors -aS unstable
# Before I create acustom-mirrors.json
... 0.363 Greece : https://ftp.cc.uoc.gr/mirrors/linux/manjaro/ 0.276 Greece : http://ftp.cc.uoc.gr/mirrors/linux/manjaro/ 0.477 Greece : ftp://ftp.cc.uoc.gr/mirrors/linux/manjaro/ ...