Check and manage pacnew files

I see that you guys are 1-2 steps ahead but just to report: i had 0.4.1, reinstalled, as discussed above, and no pacnews currently. Today came the update to 0.4.2. There was no error on the hook running.
So maybe there is a difference in behavior on self install/update and only updating other packages. Or at least there was a difference on 0.4.1. That should be irrelevant now as it is 4.2 and with Omano’s changes 4.3. is coming.

There Is the correction for the script called via the hook. Now the hook work fine. In the 0.4.3 i Will merge the correction of Omano

Something I was not able to change/fix was the disclaimer window size, for whatever reason YAD makes it very tall. I also set some other window sizes to some “arbitrary” value that work good on my side (but may not on other people’s, I didn’t test various text scaling and resolution). I changed some texts to what looks better to me from a cosmetic and “grammar” point of view.

the suffix detection may be improved, maybe there would be edge cases that wouldn’t work that I didn’t think of (path with multiple dots in it? didn’t test it now that I think about it).(//EDIT: I just thought of a way to make it fool proof, just to be sure, but currently it already contains multiple dots in the path so we’re good on that lol)

I made it so the menu for actions now has the proper pacnew/pacorig/pacsave word in it, and also has the pac file name only instead of the full path.

I made some little changes like that, from what I tested everything works but when you start and repeat the same thing over and over sometimes you miss something :smiley: so obviously please people help to test the script I sent so we detect anomalies.

I have installed and have used it to compare the files it found.It seems to be working ok as I removed what I thought I didn’t need and saved what I hoped I needed and I have not broken anything so on my end it seems to be working.I’m running 0.4.2-1.It seems like a very good way to find and compare pacnew files before they build up.
Thanks for the work on this :smiley:

Ok V 0.4.3 is online in all branchs

Adopted also the @omano tips

2 Likes

pacorig ? not exists since several years … 2016 :rofl:

and, pacsave, it’s not the same menu : remove or not but not merge :wink: or only if re-installed


for kde add optional dep for 'admin:/’ , package : kio-admin

I have seen .pacorig file on my system I think, and I don’t use Manjaro since 2016, Maybe .pacorig file can still be a thing? Need to check pacman code to know I guess.

//EDIT: Apparently, .pacorig were dropped from pacman in version 5. So not that old.
pacdiff should have dropped support for them long time ago… It is simple to remove .pacorig from the tool support anyway, just add the grep command I provided earlier in the thread when I suggested to make sure the tool properly only detect and manage .pacnew.

/usr/bin/pacdiff -o | /usr/bin/grep -v .pacorig

So if there are lines outputed from pacdiff with .pacorig, it wouldn’t use them.

But the best thing would be to update pacdiff so it doesn’t support something that should not exist anymore. All in all in current systems this shouldn’t be an issue anyway without modifying anything as these .pacorig file shouldn’t exist on people’ systems.

PS: where is pacdiff source code maintained at? I can’t find it.

So… not but yes… in the end. If you reinstall a program you removed and want to import your settings back, the replace, or the merge is the option you want.

//EDIT: @Ste74 maybe just remove the references to pacorig only in the name/description/message, but keep the script how it is as it doesn’t hurt in any way to have “support” for pacorig file which should not exist anymore in the end.

//EDIT2: I see you added the kio-admin package as an optional dependency. What is it for? It is not an issue without it I always could use the admin:/// protocol before, and now. I don’t have it installed, it doesn’t seem to be needed at all on my side, admin:/// just works in my own scripts already.

I don t use plasma so i ask for: Is neesed or not ?
I have followed Patrick’s suggestion…

Then he may know better than me, I was wondering what it was for as I don’t have it, but I can already manage things with admin:/// I tried to look at the package, maybe it adds more features regarding this protocol I’m not sure.

//EDIT: I have kio and kio-extras installed though.

yes, generaly we have the gnome gvfs (to add in dep ?)

can use this prefix in dolphin path bar ?

My experience may be only tangentially related to pacnew-checker, but I found that I needed to install the kio-admin package in order to use admin:/// with kompare.

Indeed if you install kio-admin you can use admin:// in Dolphin path bar. I don’t think this is related to pacnew-checker in the end though.

it has kio as a dependency that’s why it works for you. Remove kio-admin and install kio and check, I bet it still works.

I’m pretty sure kio has been installed from day one since it is required by several other KDE packages. But I just tried removing kio-admin, and my attempts to use admin:/// with kompare and kwrite resulted in

kf.kio.core: couldn't create worker: "Unknown protocol 'admin'."

But I don’t want to get too far off-track if you think that this doesn’t impact pacnew-checker.

I don’t know then, maybe I have other packages, but for sure kio-admin is not needed to use admin:// from terminal here. Maybe it is required to run GUI applications?

//EDIT: I see pacnew-checker has gvfs as dependency, which adds supports for admin:/// protocol. So I would assume if you installed pacnew-checker you have support for admin:/// already

Is it possible to replace the 2 grep filters to exclude .pacsave and .pacorig files with 1 grep filter to include .pacnew files?

/usr/bin/pacdiff -o | /usr/bin/grep -e .pacnew 

What do you mean? This Is the answer for? :thinking:

Current script does not need any modification, it will properly handle .pacnew and .pacsave files, and will also handle .pacorig if any on the system, which in theory should not exist since multiple years now.

We could sanitize the pacdiff output with grep for .pacorig files but if will change absolutely nothing. We want .pacnew AND .pacsave

tester/user here:
Happy with the notification/ease of use when updating in current testing update. This could help users ease into the correct management of config files when the command line is to daunting.

:cake: :coffee:

1 Like

Great to know :slightly_smiling_face:

Well with version 0.5.0 i introduce the translations for most langauges.