[SOLVED] How to deal with .pacnew files?

After three months of EndeavourOS, I’ve got some .pacnew files.

When I was on ArchLinux, five years ago, I used a tool named pacdiff, which don’t longer exits.

Is there similar tools to manage theses files ?

1 Like

I found it. It’s in package-contrib.
I just need to install vim package, and it’s working.

Sorry, for the noise.

What did you find? :sweat_smile:

In aur you have the gentoo package that can manage pacnew, also you can use pacdiff in combination with meld. You can compare the difference and move

2 Likes

I found that I am stupid.

Just after asking, I realize, that pacdiff was included in package-contrib, and didn’t work because vim wasn’t installed.

This said, it may be interesting if they are another easier ways to manage .pacnew files.

I’ll give a look at gentoo package.

Package meld is great for merging changes between files (as @ringo already said).
Also diffuse should work well.

1 Like

Thank you both.

meld seems to be enough for me.

anyone who gave kdiff a shot and can tell if it is on par with meld?

1 Like

Have you also tried etc-update (available in AUR IIRC) which finds all .pacnew files on your system and can be used to show differences and merge current and new files?

1 Like

nice cli tool!

1 Like

Personal i like meld and check wat new is manually and move those or not depend…

I just used

DIFFPROG=meld pacdiff

works very well.
Does anyone know how to modify the hook from the arch wiki
https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave#Pacman_hook
so that this will be executed?

3 Likes

So far I have always used pacnew-chaser to find pacnew-files. Is pacdiff an alternative?

not really i think… :slight_smile: pacdiff with meld , eventual you can remove it offcourse

with wayland is a pain

but using xhost https://wiki.archlinux.org/index.php/Running_GUI_applications_as_root#Xhost is possible… root and gui on wayland is a pain :slight_smile:

pacdiff is a part of pacman contrib i believe but i add DIFFPROG=meld in environment just for my own personal easy ness when do sudo pacdiff , export like in .zshrc didnt worked beautifull lol

2 Likes

pacdiff is an alternative - but so is using the eos-welcome app, which has an easy implementation for your use :grin:

1 Like

pacdiff is the official way. :wink:

And as @freebird54 already said, eos-welcome includes a button that starts pacdiff properly.
Note that you can configure usage of pacdiff in file /etc/eos-script-lib-yad.conf, variable EOS_WELCOME_PACDIFFERS.

A “terminal” way is to create an alias into ~/.bashrc, for example:

alias pacdiff='DIFFPROG="meld" su-c_wrapper pacdiff'
1 Like

I understand too little of it, what exactly does the alias? (meld is installed)

Do I need to install something else (Vim was mentioned) to use pacdiff from the Welcome app? meld is already installed.

It combines the included stuff under one name, pacdiff. This you can use on the terminal.
First it set the DIFFPROG variable (pacdiff uses it) to meld.
Then it calls pacdiff using an alternative to su. Pacdiff need elevated privileges to change system files.

3 Likes

No, if you have meld installed.

In file /etc/eos-script-lib-yad.conf there’s variable EOS_WELCOME_PACDIFFERS that specifies which programs are used with pacdiff. It uses the first program on that list that is currently installed. So probably meld in your case.
You may change the order if you wish.

2 Likes

thanks @manuel ! :+1:t2:

2 Likes