patrick-motard / dotfiles

My dotfiles
The Unlicense
19 stars 8 forks source link

pacman: mirror list out of date #92

Closed patrick-motard closed 5 years ago

patrick-motard commented 6 years ago

Sometimes mirrors go out of date and no longer work when running update. The error looks like failed to connect to archlinux mirror {OLD_MIRROR}:80 no route to host. To fix this I searched for {OLD_MIRROR} in /etc/pacman.d/mirrorlist and found it at the top of the list. I switched it with the second mirror in the list.

After some brief searching on the issue it looks like it's possible to retrieve an updated list of mirrors and then sort them by speed using an arch package called reflector. It's not clear to me if reflector can get the new mirrorlist as well. Examples don't indicate to me that it can. Reflector can also be set up to run as a hook in pacman. Examples are on the arch wiki.

I'd like my OS to update it's mirrorlist and sort it by speed automatically before updating so that this doesn't require manual intervention again.

patrick-motard commented 6 years ago

relevant links:

amasover commented 6 years ago

I have a command to do this. I can share it with you when I get back from my trip tomorrow.

(I have a few other tweaks as well that I'm overdue on opening PRs for.)

amasover commented 6 years ago

Sorry for the delay. This is the command that I prefer:

sudo reflector --verbose --protocol https --age 8 --sort rate --save /etc/pacman.d/mirrorlist