What to do with /etc/locale.gen.pacnew?

Pacnew files are only generated with updates.

1 Like

That makes sense but, when I removed the mirror file, and it asked me to reprioritize how I wanted mirrors selected, and it re-scanned on those geographical areas, and wrote back to the mirror file, isn’t that an update? Maybe it’s all semantics and some things are defined as an update and other operations, though similar are put in a different category.

Running pacman -Syu is an update, which has the potential to generate .pacnew files.

Anything outside of that is NOT an update, but a modification the user is doing, hence why we have to deal with .pacnew/save files from time to time, we are modifying something.

1 Like

The definition of update depends on the context. Modifying a mirrorlist file is an update to that file.

.pacnew/.pacsave files are created during pacman operations including pacman updates.

2 Likes

^ what he said. I could have been more clear on that.

2 Likes

I can see that in the removal of the mirrorlist pacnew file, but then just giving it what it wanted in the next step, a Geographic region for priortization, it is a pretty non-specific and non-critical action, so If I were writing the algorithm that decides these things I could regard that as a situation not warranting special consideration…

Updating mirrors doesn’t have anything to do with managing new files, unless a mirror file had been created during a pacman update

1 Like

Yes, that makes more sense then what I was just thinking…

I probably wasn’t paying attention, but every time I use yay, which I understand is a pacman wrapper, along with everything else it updates, it’s updating the mirror files, yes? So therefore the mirror pacnew files appear?

Only when there is an update to the package:

core/pacman-mirrorlist 20220724-1 [installed]
    Arch Linux mirror list for use by pacman

a /etc/pacman.d/mirrorlist.pacnew is created for not overwriting the modifications done by the user to the “original” file.

1 Like

I think I see. Mirrorlist in the sense of the program that DOES the mirrorlist compilation, rather than the output of same… is what is being updated… And that triggers a conservative action to preserve the old compiled listing results in case the new program version does things differently… Or as you say to not overwrite the older file, in any case…

No. You have to update your mirrorlist on your own, unless there’s an update to the mirrorlist program which is basically just a compendium of all Arch mirrors available. At that point, you will be prompted about a pacnew file.

That’s why it’s step 3 in my update thread, you should look that over again.

1 Like

Yeah, found it:

A .pacnew file may be created during a package upgrade (pacman -Syu , pacman -Su or pacman -U ) to avoid overwriting a file which already exists and was previously modified by the user.

And a decision tree about the three versions that might exist and how that’s resolved.

Most of the confusion I was having related to mirrorlist as a program vs mirrorlist as the output of that program. In the Manjaro world it’s all buried somewhere.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.