Check and manage pacnew files

image

If you know of a way to accomplish that, that would be great.

1 Like

Exists already for existing tools …

The hook itself is not the issue. :wink:

Then … I dont know what is ?
You use the same hook in the same way but modify the exec (in delta):

diff -u "${pacnew_path}" "${modified_path}" | delta

Definitely not, until you make it 100% “safe” to click randomly in it (see my previous post)

2 Likes

In fact, this is the most frustrating work to do after each upgrade operation, in addition to those new additional packages.

It would be great to have this utility to start after all upgrades are finished, but the problem is that upgrading can be triggered via multiple tools: pamac gui, pamac cli, yay, pacman…

For Pamac GUI, the perfect solution would be to have the whole erasing, comparing, merging, editing operations inside Pamac interface, so after all upgrades are finished, a new pop window appears with full list of all new pacnew files that needs user intervention, at this stage the user can select what to do with each item, for comparing and merging an external tool like Meld can be invoked.

I’m sorry but i think this causes more problems than it resolves.

Honestly, it must be 5 years ago i touched any .pac* files. And things just work.

Contrary to this, when i very first started using manjaro i used a helper, and replaced shadow. Guess what happened next?

edit: at least don’t offer replace as a GUI button.

1 Like

With gentoo’s etc-update it’s like “1, 3, left, right, left, left, right, left, y, y”. Done.

Has to be great using 5 years old config files, with who knows how many deprecated options and who knows how many missing new ones.

And this is the reason no amount of scripts, apps and helpers will help if you don’t use your brain.

4 Likes

If a software is close to decently written, there is no issue. Deprecated options don’t matter except they make a log message telling you so. New options default without being explicitly specified, so nothing breaks. If some cross-compatibility issue arises, then ti is communicated. Otherwise the software you are using is trash for just assuming every user runs a clean compile or tracks upstream and modifies their config in sync.

edit: i have only released software as tarballs, but even then i always knew i had to handle configs of previous versions in some way.

What are you talking about?
pacnew files arise because of modified configuration files and pacman takes the stance that it shouldnt just overwrite those …
So no … defaults dont ‘just happen’ with ‘good software’.
Firefox or X11 or whatever will still use the configuration files that take precedence, as they should, and the package manager respects your configuration, as it should … hence … users must manage changes, such as when the ‘community’ repo was deprecated… in that case users who had modified pacman.conf must handle the difference … users that had never modified it would not receive a pacnew.

If you use Linux you know your configs work forever. So is right to assume in other software. If they don’t care to do that, at least they should warn about deprecated features before stopping supporting them. Never should it happen that things don’t work because of outdated config.

1 Like

What again ?

So surely all of my xorg configurations and my clipboard script will work under wayland?
What about that boot option in grub that has an entirely different syntax in kernels 6+?

I’m sorry but if you have some personal view of system packaging that differs from Arch … then … I dont know why you use that structure? Dependencies and conflicts and all of that stuff is handled a certain way with ALPM … and has been on at least the same track for quite a long while.

Your personal journey to understanding pacnews is probably not the point in time and space to make such a wide argument for how you think it ‘should be’.

You talk something different, i talks about using Linux.

Maybe I’m just ‘objectively wrong’ again until you can google-figure it out. :joy:

I talked about using Linux as an example. Of how things should work in the wider ecosystem.

I dont even know where to begin.

But if you have now stopped entering and deleting posts … maybe I will drop a link to another page on the matter…

Because I know coming from only managing tarballs it may not be fully apparent how package management works … but … despite all the groanings … a lot of what you are saying you ‘wish’ for is actually already how it is.

You want warnings? You got em – pacnews.

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. When this happens, a message like the following will appear in the output of pacman:

warning: /etc/pam.d/usermod installed as /etc/pam.d/usermod.pacnew

https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave

I saw you edited you post also, so why even mention it.

I was just trying to say that Linux has managed to not break config (userspace) for decades, we should expect it from userspace software also. And if they don’t manage such quality, at least expect it to work even with wrong config and fall back to default, while telling you what to fix. Anything less than this is a marker for this software development team to not care about the user, and should be forgotten.

edit: manjaro works ½ this way. The update threads tell when anything is needed to configure. Aside from that, you can forget .pac* files. Downside is you need to check the update thread.

I may have added an indentation.

I didnt create and delete multiple posts, removing entire portions of previously available text, while apparently frantically changing what I said (like the one where you said I was ‘objectively wrong’ that you then removed … after apparently realizing something or other …)

Anyhoo … I was trying to avoid such dramatic technicalities which is why I was trying to wait and/or poke fun. Guess its another sensitive subject.

I was going to react to some other claims you just made … but you are apparently at it again … so … I’ll just let you have whatever opinion you would like to have …

whatever you feel comfortable with

edit: this exchange started with you telling me there is something wrong using 5 year old config files. While i try to tell you any software that is worth using will tell you if your existing config differs in action from the way the new config and software works.

5++ years, zero issues, seems the software Manjaro uses is not completely ■■■■.

edit2: theoretically you might have a point using a shitty distro or software that does not respect the user.

1 Like

You don’t have to do anything; with this tool when a new pacnew/pacsave is detected you will be shown the warning and you decide what to do with it.

2 Likes