Equivalent to pacnew and pacdiff?

On Linux Manjaro, when there is a system update and so new config files, these files are saved with the extension *.pacnew; most of the time these config files contains new options: I can check them with the command sudo -H DIFFPROG=meld pacdiff. In this way I can just merge/add the new options instead of completely replace the whole config file.

After a search on Google I read that on Ubuntu, if there are new config files, I will be prompted to replace them, instead of merge/add only the new options. Is it true? There is a way to show diffs and using meld to manage them?

Kind regards.

Ubuntu uses Debian package tools, so we’ve the standard features that exist on both systems.

I apply almost all my upgrades at terminal, and expect if I have a system upgrade that changes a configuration file; it’ll detect I’ve modified it from file metadata & I’ll be offered numerous options somewhat like below I’ve obtained from a webpage here.

10.190.113.11 Configuration file `/etc/nscd.conf'
10.190.113.11  ==> Modified (by you or by a script) since installation.
10.190.113.11  ==> Package distributor has shipped an updated version.
10.190.113.11    What would you like to do about it ?  Your options are:
10.190.113.11     Y or I  : install the package maintainer's version
10.190.113.11     N or O  : keep your currently-installed version
10.190.113.11       D     : show the differences between the versions
10.190.113.11       Z     : start a shell to examine the situation
10.190.113.11  The default action is to keep your current version.
10.190.113.11 *** nscd.conf (Y/I/N/O/D/Z) [default=N] ?

In practice if I get in that position, I may open another terminal (easy using a GUI, otherwise I’ll use another text terminal or if remote start another session) rather than accept the offer to open one in that terminal, then ensure I make a copy of my config, then either opt to accept all changes (package maintainers version) & edit whatever I feel i need into the new configuration, keep my existing (based on what I saw in the provided diff I viewed, & confirmed in my own terminal session). The options you get can vary on release & other details.

2 Likes

There is a way to rely on meld to do these tasks?

I’ve done a search, and seems that the diff program is hard coded inside /usr/bin/ucf.

To use meld, seems that I had to choose

Z     : start a shell to examine the situation

And issue a sudo meld $DPKG_CONFFILE_OLD $DPKG_CONFFILE_NEW

Am I right?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.