`pacman-mirrors -g` should not add multiple protocols to mirrorlist
Created by: jonathonf
Currently, pacman-mirrors -g
will add each available protocol for each mirror to mirrorlist
. This can result in three "duplicated" mirrors and lead to reduced resilience; it's conceivable a user ends up with e.g. nine mirrorlist entries but over only three mirrors.
Each mirror should be added only once, ideally in order HTTPS, HTTP, FTP.
Thinking, this might be easiest by reordering the mirrors JSON data and setting the first responding protocol, e.g. from:
{
"country": "Germany",
"url": "https://ftp.halifax.rwth-aachen.de/manjaro/",
"protocols": [
"ftp",
"http",
"https"
]
},
to:
{
"country": "Germany",
"url": "https://ftp.halifax.rwth-aachen.de/manjaro/",
"protocols": [
"https",
"http",
"ftp",
]
},
then e.g. test foreach protocol in protocols