You are not logged in.
I'm using paru to update the system when I run pacmatic. Some times I need to use sudo to replace pacnew files. However, if I always run pacmatic with sudo that causes issues when paru updates packages from the aur. So, instead I've appended sudo to the calls to functions calling $pacdiff_program. Is there a better means of handling this than adding sudo to parts of a script? Is there any means that would not require editing the pacmatic script to run vimdiff with different permissions from the rest of pacmatic?
Offline
the point is to not automate it at all - same as you're not supposed to run updates unattented
just replacing current configs with new defaults also can cause severe issues - instead you're supposed to check the difference and merge them properly
Offline
I'm hoping they are just using pacdiff for an interactive merging session.
Speaking of which, it does have a dedicated -s option so pacdiff will properly invoke sudo on it's own. And the underlying question, sudoing the distinct necessary parts that actually require this is the way to do it for scripts.
Offline
the point is to not automate it at all - same as you're not supposed to run updates unattented
just replacing current configs with new defaults also can cause severe issues - instead you're supposed to check the difference and merge them properly
I merge them manually after reviewing. pacmatic doesn't always play nice with paru, if paru is configured to update the AUR and Arch repos.
Maybe, pacmatic needs to be updated to not break if the pacman_program and pacdiff_program values are changed. I just put sudo before pacdiff_program calls. So, I can update AUR files, and have pacdiff delete the pacnew after I've edited everything to be the same.
Offline
I just noticed pacmatic is no longer in the aur? Can I just fork and add it back? Looks like the developer behind it is no longer involved with Arch.
All it is is a script that checks the news, and deals with notifying the user to update pacnew files and such.
Last edited by zerophase (Yesterday 00:38:50)
Offline
then what's the need to run that as root anyway?
Offline
You can't delete the pacnew files without running as root. Pacmatic is script in Arch from like 16 years ago for adding a bunch of maintenance tasks every time pacman or an aur helper is run.
Offline
well, I have not experienced what might happen when a package ships a .pacnew while another from a previous update still exists - but I still fail to see a point where one would want to auto-cleanup any .pacnew file en masse
and even then I would either use something like
sudo rm $(find / -name "*.pacnew")
or would use a pacman hook
Offline