Web lists-archives.com

Re: how to view config file changes without running an upgrade?




On 2018-03-21, The Wanderer <wanderer@xxxxxxxxxxx> wrote:
>
>> Hi folks,
>>=20
>> How can I view the diffs between my local modified config file (maybe
>> modified 2 years ago) and the maintainer's config file included in
>> the currently installed package or in a pending package upgrade? I
>> would like to review my diffs, before running "apt upgrade".
>
> In my experience, when (what I think Debian officially calls) a conffile
> has been locally modified, the upgrade process (by default) halts and
> presents a prompt asking the user what to do; the options include "show
> a diff of the contents", "background the install so other actions can be
> taken", "keep the locally-modified version", and "replace the local
> version with the package's version". I think there's an apt config
> option to affect this, but I don't know what it is or exactly where to
> find out.
>

It looks like this:

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

man dpkg (confmiss, confnew, confold, confdef, confask). 
      
So with apt you can presumably do something like:

 apt-get -o Dpkg::Options::="--force-confold" -dist-upgrade

(Which would preserve the user-modified conffile with prompting.)

-- 
Bah, the latest news, the latest news is not the last.
Samuel Beckett