You are not logged in.

#1 2019-07-28 16:32:18

doums
Member
Registered: 2019-03-15
Posts: 10

Question about how pacman uses the mirrorlist

Hi,

Based on https://wiki.archlinux.org/index.php/Mirrors, it is suggested to put several "valid" mirrors in the mirrorlist file. The order of the servers in this list is their priority.
I would like to know how pacman uses these mirrors when I issue command like "pacman -Syu" to upgrade the system.
Does pacman use only the first one in the list ? If yes, why is it suggested to put several good mirrors ?
Does pacman use more than one ?

Last edited by doums (2019-07-28 16:33:25)

Offline

#2 2019-07-28 17:05:12

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,446

Re: Question about how pacman uses the mirrorlist

For each file pacman downloads it will initially try the first mirror in your list. If that is unsuccessful for any reason (server down, file not found etc) it will then try the next, and so on...

If no mirrors are found for any file pacman will error out.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-07-28 18:30:06

loqs
Member
Registered: 2014-03-06
Posts: 9,078

Re: Question about how pacman uses the mirrorlist

The first mirror is also the one that supplies the repository database files so if the first mirror loses synchronization it is the same as every mirror in the list being out of sync.

Offline

#4 2019-07-29 21:15:52

doums
Member
Registered: 2019-03-15
Posts: 10

Re: Question about how pacman uses the mirrorlist

Thanks for your answers!

Slithery wrote:

..If that is unsuccessful for any reason (server down, file not found etc)...

Is it possible for a synchronized mirror not to have a required file ?

EDIT: by "synchronized" I mean a mirror which is not listed in the "Out of Sync Mirrors" section of the official page https://www.archlinux.org/mirrors/status/

Last edited by doums (2019-07-29 21:18:05)

Offline

#5 2019-07-29 21:53:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,287
Website

Re: Question about how pacman uses the mirrorlist

Yes.  The mirror could have recently been synced, but a file was somehow removed (disk error on the mirror server, errant `rm` command).  Or the mirror could be recently synced, but still fail to communicate with your system.

But far more importantly (because it's more likely) a mirror could have been very recently synced when you last updated your mirror list - but then it stopped getting new updates.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB