Discussion regarding pacdiff error

Greetings lovely community,

Depending on the task I’ll use either the terminal or a GUI if one is available. In regards to pacdiffs, I’ve always just used the one included as part of EOS Welcome app under Assistant > Pacdiff & meld. Well today I wanted to avoid using a GUI and use the terminal (the more terminal the better right?), and when I ran the pacdiff command in the terminal I got the following error message:

[scott@EndeavourOS ~]$ pacdiff
==> ERROR: Cannot find the vim -d binary required for viewing differences.

The solution I found to this was that I needed to have vim installed. I know there’s a few options for that, namely vim or gvim so I installed gvim by running:

sudo pacman -S gvim

And then ran pacdiff again and luckily the error went away. I only bring this up because I found this a bit odd that a pacman-contrib script wasn’t working out of the box (installation was done via Apollo iso, all values at their defaults). Has anyone else come across this issue or am I a lone case? I was able to fix the issue no problem, but IF it is an issue, perhaps vim or gvim may need to be included by default? Or perhaps /etc/eos-script-lib-yad.conf needs to be updated in any way?

Would appreciate any insight and feel free to discuss anything related to this or other relevant pacman scripts.

Also, here’s my /etc/eos-script-lib-yad.confin case anyone wants to have a look, the only thing I changed was adding Tilix as my terminal of choice, the rest are default values:

https://clbin.com/jhjyy

You can tell it what tool to use for merging by setting DIFFPROG and MERGEPROG to you preferred merge tool.

This is laid out for you in pacdiff

Environment Variables:
  DIFFPROG          override the merge program: (default: 'vim -d')
  DIFFSEARCHPATH    override the search path. (only when using find) (default: /etc)
  MERGEPROG         override the 3-way merge program: (default: 'diff3 -m')
2 Likes

Since I want to stick with nano, I use the following:

sudo DIFFPROG=nano pacdiff

2 Likes

I apologize if I end up making you repeat yourself, but shouldn’t pacdiff command work out of the box in a terminal or does it require manual intervention even on say an Arch install as well?

@pebcak good thing to note, I’ll have to check what mine is set to, since I like using nano as well

1 Like

It does “work out of the box”. It uses vim -d by default and if you would prefer to use something else you can change that.

This is exactly the same on Arch.

1 Like

On an EndeavourOS fresh install, run pacdiff in a terminal and watch as it does not work as you get the error I mentioned in the first post. I don’t see that as working out of the box. I see that as an issue. Now does it work out of the box when used in conjunction with the Welcome app? Yes. But it doesn’t work out out of the box on it’s own in a terminal window is all I’m trying to say. By default it uses vimdiff, but if vim isn’t installed by default, then any user will get that error message. I assume vim is installed by default in Arch or perhaps not? It just seems like an odd quirk.

Not :slightly_smiling_face:

2 Likes

Neither is pacman-contrib which provides pacdiff installed by default in Arch.

Nothing is installed by default in Arch :sweat_smile:

1 Like

Why exploding head emoji? You knew exactly what information you were looking for and procured it.
“Greetings lovely community,” is a bit much.

2 Likes

It is the nature of many cli tools. They are often configurable and require you to set options to use them.

2 Likes

There’s a Pacdiff & meld option in the Welcome app within the Assistant tab. So yes, it does work “out of the box” :wink: Just not how you might think it would.

1 Like

I guess I always assumed vim was a common package that was installed since it’s used for a few different things; didn’t realize until know it’s not a default for most distros. pacman-contrib is great though so I’m glad it’s included on EndeavourOS, but I can see now why it’s not on Arch, since it installs only what you tell it too, I should have known :sweat_smile:

@Elloquin The exploding head emoji just means, “my mind is blown, because I’m an idiot” that’s all, no more, no less. And I’ve been saying the “lovely community” part for every post of mine for the last year. I’m not entirely sure why a forum moderator would have any issue with that, it’s just a polite greeting towards a community that I respect and admire for their experience and knowledge. Now if you’re having a bad day or something, I do hope things turn around, but this is all a bit off topic.

@dalto “the nature of many cli tools” this right here pretty much puts it into a much better perspective for me that I now understand. I was really scratching my head before. So it looks like anyone that wants to use pacdiff has to set it up and configure it. I was simply under the misunderstanding that it was already pre-configured. I do appreciate this comment for the clarity.

@sothis6881 yeah that was exactly why I wanted to try it without the GUI and now I know it requires a few extra steps if you don’t want to use the Welcome app option :sweat_smile:

5 Likes

I’m not currently at a linux box so cannot study the issue right now.
But we have app eos-pacdiff that takes care of setting up pacdiff.

You might consider aliasing pacdiff to run eos-pacdiff:

# file ~/.bashrc

alias pacdiff=eos-pacdiff

Note that eos-pacdiff can be configured to use the diff program of your choice.

1 Like
[scott@EndeavourOS ~]$ eos-pacdiff
eos-pacdiff: nothing to do.

Thanks for the heads up, I didn’t know this was part of EndeavourOS, but a quick search finds your old post about it ( Code re-organization: eos-pacdiff ). Next time I run across pacnew/pacsave, I’ll be sure to give eos-pacdiff a try :wink:

1 Like