You are not logged in.

#1 2016-04-26 03:58:09

amish
Member
Registered: 2014-05-10
Posts: 470

How to avoid mirrorlist.pacnew file due to frequent updates?

These days pacman-mirrorlist package is updated too frequently. (almost everyday)

Which makes things annoying because on every update it creates mirrorlist.pacnew file

And then every time you need to move it to actual mirrorlist file (with ur preferred mirror un-commented or manually added)

-------

So can we not have default "uncommented" directive in "mirrorlist" file for example say:

Include = /etc/pacman.d/mirrorlist.local

(this will store user's own mirrors)

if file does not exist - the line will be ignored.

If file exists then all  servers in that file will also be included.

This way users will make modifications in mirrorlist.local file and actual mirrorlist file will remain intact.

This way everytime pacman-mirrorlist package is updated - editing / moving around the mirrorlist file can be avoided.

So please consider.

Thank you.

PS: I am not lazy but it gets annoying when u have to keep updating mirrorlist.pacnew file everyday.

Offline

#2 2016-04-26 04:01:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

NoExtract would be the obvious move...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-04-26 04:03:20

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

That's the one update where I basically just ignore it.  It does create the .pacnew file, but I just leave it there and continue to use the same mirror I always do.  If my main mirror goes down, I have the .pacnew file that I can easily move into place and select another mirror.

Offline

#4 2016-04-26 05:19:35

amish
Member
Registered: 2014-05-10
Posts: 470

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

jasonwryan wrote:

NoExtract would be the obvious move...

Thanks but thats not what I want. I DO want latest list!

I guess what circleface said is what I should do too. i.e. let pacnew file just lie there.

Last edited by amish (2016-04-26 05:20:26)

Offline

#5 2016-04-26 05:21:52

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

+1 for NoExtract ... just use reflector in a script or alias:

% which upp
upp () {
	for i in 1 2 4 8
	do
		reflector -c US -a $i -f 5 -p http -p https -p ftp --sort rate --save /etc/pacman.d/mirrorlist.reflector
		if [ $? -eq 0 ]
		then
			cat /etc/pacman.d/mirrorlist.reflector
			sudo pacman -Syu
			return 0
		else
			echo "something is fucked up"
		fi
	done
}

You will need to create and chown /etc/pacman.d/mirrorlist.reflector to your user prior to the first time you run it.  Also edit /etc/pacman.conf to use the mirrorlist.reflector file you generate.

Last edited by graysky (2016-05-02 09:36:15)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2016-04-27 21:13:00

creatid
Member
From: Netherlands
Registered: 2009-12-19
Posts: 75
Website

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

I simply copied my preferred mirrors to the top of the mirrorlist file. Whenever a new version arrives, a quick 'diff' will tell me if any of these are affected (usually not). Copy the list to the new file, rename, done. Quite painless, really.

Offline

#7 2016-04-27 22:01:19

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

I simply generate a custom mirrorlist using

reflector --country Germany --sort score -f 10 -l 100

from time to time.
The mirrorlist.pacnew file is stored as mirrorlist.orig for reference only.


To know or not to know ...
... the questions remain forever.

Offline

#8 2016-04-27 22:17:42

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

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

amish wrote:

So can we not have default "uncommented" directive in "mirrorlist" file for example say:

Include = /etc/pacman.d/mirrorlist.local

Eh, what?  Why ask everyone else to change for you, why not just set up your system the way you want.  Add a line to the end of your /etc/pacman.d/mirrorlist:

Include = /etc/pacman.d/mirrorlist.pacnew

The pacnew can be updated every time, and your own settings in mirrorlist will take precidence but the new (pointless commented) changes will also be included.

But considering the caveate in parenteses, I don't see the point of this: you'd be including a fully commented - aka non-functional - file.


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

Offline

#9 2016-05-02 03:36:56

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

There is nothing special or awesome about the mirrorlist contained in the pacman-mirrorlist package, a custom mirrorlist generated with reflector is probably always going to be better.

I have a dummy package which provides/conflicts pacman-mirrorlist (along with several other packages that are required, like translations packages).
It's like NoExtract except it doesn't get listed in updates etc. wink


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#10 2016-05-02 09:21:58

aexoxea
Member
From: Australia
Registered: 2012-11-17
Posts: 70
Website

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

I'd like to second @creatid's approach. I also have my preferred mirrors copied (not moved) near the top of the mirrorlist file and then uncommented, with the rest of the file 'unmodified'. This makes easy work of merging the changes with e.g. pacdiff (part of the pacman package) and your preferred diff program.

Offline

#11 2016-05-02 09:35:11

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

You guys are making this too difficult.  See my post above.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2016-05-02 11:19:11

aexoxea
Member
From: Australia
Registered: 2012-11-17
Posts: 70
Website

Re: How to avoid mirrorlist.pacnew file due to frequent updates?

I probably should have noted that I my ISP mirrors the AL repos, hence why I have an interest in setting particular mirrors rather than using reflector.

I'll leave this alone now smile.

Offline

Board footer

Powered by FluxBB