EOS Welcome app has "Pacdiff & Meld". I read the arch wiki and am still unsure how to use "Pacdiff & Meld". Would someone please explain what a user is supposed to do with EOS "Pacdiff & Meld"?

Hi :slight_smile:

Read this: https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave

Would appreciate a bit simpler explanation on how to use “Pacdiff & Meld”, what it does and when to use it.

Thank you!

1 Like

Really good question, something I always intend on looking up but never do

1 Like

:hugs:

2 Likes

What I take from this is something I do before any update already. Backup.

1 Like

Backup is always a very good idea.

Anyway, Pacdiff & Meld combines those programs for easier way of merging changes to config files.
Config file changes may or may not affect the features of an app. Merging is (or should be) optional, i.e. apps should work well even without merging the changes. However, sometimes a config file change may enable new features that a user finds useful. So, looking through the changes may reveal something new that you might have wanted (but never bothered to ask).

Pacdiff contains the logic that drives merging.
Meld is a GUI tool that helps merging changed lines into a config file.

See also:

  • man pacdiff
  • man meld
  • eos-apps-info-helper eos-pacdiff

Example

We have a config file /etc/locale.gen containing locales for the system.
At times this file will be updated, and file /etc/locale.gen.pacnew is created that includes all locales. And there may be other config file updates too.

Now, if you want to see what has changed in the config files, click the Pacdiff & Meld button (or run command eos-pacdiff) to see them. It runs pacdiff which shows each changed config file in turn. User can now choose what to do. Selecting the (V)iew operation starts meld that shows the contents of the existing and the new config file, side by side.
Now you should see which of the changes are useful for you, if any. Meld helps you merge the lines you want to merge.

Warning

There are files that you should not merge, for example

  • /etc/passwd
  • /etc/group

If you blindly merge all changes to those files, you probably won’t be able log in anymore!

5 Likes

100% always make backups and make at least 2

3 Likes

There are likely youtubes that introduce each tool and show it being used. Could be helpful for some if they learn that way. Maybe.

I use meld personally. It has decent keyboard shortcuts. I’d really like to use vim/nvim to do these, but someday I’ll get there.

1 Like

Yer another thing for people who are learning is try it in a VM first, yes you might be doing double the work but if something screws up in the VM you save yourself a headache later.

1 Like

VM is overhead for using an application like meld or pacdiff. I have both installed and use them for different items. Arch isn’t that brittle. You’ve got /var/log/pacman.log and can walk your install backwards if needed.

True but still much better to screw up in a VM and save a headache like I said as well

I wouldn’t recommend double handling if you know what you’re doing/how to get yourself out of trouble

Hrm. A potential exercise. Take your ASCII text resume, make two copies. From one copy, remove several lines. From the other, remove some different lines and words.

Use a potential diff tool to reconstruct the two copies to match the original.

Most probably would use diff tools on mirrorlist files. One should still see a valid mirrorlist minus any changes, but they may need to re-enable/uncomment their favorite preferred mirror.

Have fun! These diff tools make it easy to visualize differences. Usually you only want to go one way, but there may be times to go both left and right.

1 Like