Comprehensive pacman-mirrorlist.conf

how do I persist this into pacman-mirrorlist.conf, sadly the documentation on the wiki/man page does not seem to list the full configuration options, and they do not appear to use the same case as the cli

pacman-mirrors --proto https --api --continent -m rank

in case you wonder why I use continent instead of country or geoip, I’m close to Canada, and it’s mirrors do seem faster than some US options.

That’s already default:

# Method = rank

Uncomment and modify this line to:

Protocols = https

I’m not sure if the other switches are able to be specified in the configuration file. Maybe @linux-aarhus knows.

yeah, I got some of it, I think it’s --continent that I’m not sure about

you can also use -c Global,Canada,United_States

$ man pacman-mirrors

....

   API
       -a, --api
              Instructs pacman-mirrors to activate  processing  of  API  argu‐
              ments.

       -B, -S, --set-branch BRANCH
              Permanent change branch, using stable, testing or unstable.

       -p, --prefix PREFIX
              Add  a path prefix to pacman-mirrors file-handling eg.  /mnt/in‐
              stall or $mnt.

       -P, --proto, --protocols PROTO [PROTO] ...
              Write protocols to configuration, using all or http, https,  ftp
              and ftps.

       -R, --re-branch
              Replace branch in mirrorlist.

       -U, --url URL
              Replace mirrorlist with supplied url.


....

This command will write https as the only protocol to pacman-mirrors.conf and exit

$ sudo pacman-mirrors --api --proto https -n
....
## Define protocols and priority
##   separated by comma 'https,http' or 'http,https'
## ATM available protocols are: http, https, ftp
## Not specifying a protocol will ban the protocol from being used
## If a mirror has more than one protocol defined only the first is written to the mirrorlist
## Empty means all in reversed alphabetic order
Protocols = https
....

You cannot set a country list in pacman-mirrors.

The mirror pool is generated by using the --continent argument and saved in /var/lib/custom-mirrors.json and is never reset unless the user chooses to do so.

The pamac-mirrorlist.timer will recreate the mirrorlist once a week but as pamac is calling pacman-mirrors to do this - it will use the mirror pool defined by the user in custom-mirrors.json.

1 Like

Try the long-term solution from the Update breaks dependencies of the latest update wiki.

:crossed_fingers: