Artix Linux Forum

Artix Linux => Package management => Topic started by: onekk on 22 December 2021, 11:46:08

Title: how to fix mirrorlist replacement.
Post by: onekk on 22 December 2021, 11:46:08
Hello, I've had a little problem updating ArtixLinux.

Some program complains about library problems.

And I found that mirrrolist was not update, but insted a mirrorlist.pacnew file was created.

Probably due to some modification I've done in the mirror order for Europe.

There is a way to force upgrade of mirrorlist even if it is modifie, maybe using some setting in pacman.conf?

TIA, Regards and Merry Christmas

Carlo D.
Title: Re: how to fix mirrorlist replacement.
Post by: qontinuum on 22 December 2021, 18:36:53
RTFW: https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave

You will have to merge the stuff by hand using vimdiff or whatever diff tool you are using.
You may also see that there is no interesting diff in the new file and you can safely delete the new mirrorlist in this case.
The mirrorlist is actually updated as you can see if you check in pacman, there is just this manual step to do that exists to protect you configurations.
Title: Re: how to fix mirrorlist replacement.
Post by: strajder on 22 December 2021, 18:47:16
Related to mirrors file, it is also very useful for speeding up things: rankmirrors (https://wiki.archlinux.org/title/Mirrors#List_by_speed), and ParallelDownloads option in /etc/pacman.conf.
Title: Re: how to fix mirrorlist replacement.
Post by: qontinuum on 22 December 2021, 19:19:18
Don't abuse ParallelDownloads tho
Title: Re: how to fix mirrorlist replacement.
Post by: conky60 on 22 December 2021, 19:48:59
Sometimes new mirrors are added or previous ones removed so it is good to examine the mirrorlist.pacnew to determine if such is the case.
Personally what I do is navigate to /etc/pacman.d in your file manager and open a terminal there...the run rankmirrors as such: 
rankmirrors mirrorlist.pacnew
I then open existing mirrorlist file with a text editor and select all and backspace to remove, then copy and paste the terminal output from rankmirrors into the now empty mirrorlist file....save the file...you will have to enter root password to do so.
Works for me.
As @strajder‍ suggested it is also a good idea to enable ParallelDownloads = 5 in /etc/pacman.conf. Speeds things up considerably in my experience.  :)

Best regards.
Title: Re: how to fix mirrorlist replacement.
Post by: onekk on 27 December 2021, 12:46:40
Many thanks to all.

I have collected some pacman one liners and I have one of them that report all .pacsave .pacold and .pacnew in /etc.

But as mirrorlist could cause problem like in my case to use outdated and non maintained mirrors,  I have tought that there is a way to reverse the behaviour.

In other word, when a new mirrorlist is installed it will became the deafult one and a .pacold file has to be created and maybe a warning issued where it would be very visible, at the end of the pacman otput, so a user could apply wanted or needed  changes to the new mirrorlist.


No problem if there is no such mechanism, I will place a post-it to remeber to check mirrorlist against change, or maybe some shell script that will verify presence of "mirrorlist.pac*" to signal that something has changed.

Best Regards

Carlo D.