Check and manage pacnew files

The audacity to come here, asking to scrap this project and fork another one so user can continue to use something he used before and likes better. Are you insane?

//EDIT:

There is an issue @Ste74 with the HOOK script /usr/share/libalpm/scripts/pacnew-check, the use of last command should be stopped. It cuts the username to a specific length so it breaks if username is longer than 8 characters. Is it even need to “sudo as the user” when the hook is executed? Isn’t it a root action already? Anyway, basically last update broke it for people with username longer than 8 character.

Maybe with Polkit you can allow Pacnew Checker to delete that file without elevating privileges.

On another topic, I think the whole authentication thing should be changed, typing the sudo password for every click/action is getting old I’m not gonna lie. I don’t have a good idea for now to change this. will update this post if I have a bright idea.

//EDIT2: For the hook script problem, maybe a simple solution is to touch the file /tmp/pacnew-check.file as root (no sudo) and chmod it 777 so the user can delete it. Problem solved. (//EDIT: no, user can not delete it then only owner can in this folder)

I see there is still kio-admin as optional unrelated dependency in the package. As stated before it is not needed for the admin:/// protocol. It seems to be needed for that protocol to work in GUI file explorer which has nothing to do here.

//EDIT3: I now think it would be simpler to make a Polkit permission file and just allow all actions by default, it currently is kind of a mess regarding the dozen authentication you need to do when you want to manage a few .pacnew files. But I would not do that without more safeguards for the critical .pacnew files that should never be allowed to be merged, see my early report about that Check and manage pacnew files - #7 by omano