Hi!

On Mon, 2019-08-05 at 15:53:08 +0100, Dreamcat4 wrote:
> Package: dpkg
> Version: 1.19.6

> If I specify --force-confold option to dpkg -i while upgrading /
> reinstalling. Then I get the following output:
> 
> $ sudo DEBIAN_FRONTEND=noninteractive dpkg -D200 --force-confold -i 
> teleport*deb
> (Reading database ... 265903 files and directories currently installed.)
> Preparing to unpack
> teleport_4.0.0-rc.4-42-8_amd64_43a3d__expires-15.46pm-mon-05-aug-2019.deb
> ...
> D000200: process_archive conffile '/etc/teleport.yaml' in package
> teleport:amd64 - conff ?
> D000200: pkg_conffiles_mark_old '/etc/teleport.yaml' namenode
> '/etc/teleport.yaml' flags 5
> Unpacking teleport (4.0.0-rc.4-42-8) over (4.0.0-rc.4-42-7) ...
> D000200: conffderef in='/etc/teleport.yaml' current 
> working='/etc/teleport.yaml'
> D000200: tarobject conffile extracted
> Setting up teleport (4.0.0-rc.4-42-8) ...
> D000200: conffderef in='/etc/teleport.yaml' current 
> working='/etc/teleport.yaml'
> Installing new version of config file /etc/teleport.yaml ...
> id@asrock-z170-ocf:~$

> However there is no explanation whatsoever, being reported back to the
> user, even with logging level -D200, as to why the behaviour of the
> --force-confold flag is being overriden. As to why a newer config file
> is being installed.

There's no overriding going on here, because the file on-disk has not
been modified, as documented in the man page:

     confold: If a conffile has been modified and the version in the
     package  did  change,  always  keep  the  old  version  without
     prompting, unless the --force-confdef  is  also  specified,  in
     which case the default action is preferred.

> Wheras if the user had edited the config file, then under that other
> arbitrary circumstance. Well then dpkg DOES indeed report why it's
> decided to either keep or overwrite the config file. With a proper
> explanation of what it's detected and what it's doing in this case it
> says:

This circumstance is not arbitrary, it's just the documented behavior.

> This (to me) is an inconsistent behaviour and should be rectified in
> the first instance to add more message or logging lines in a similar
> fashion to the 2nd case (except to say the opposite, why it's
> overwriting the config file despite the --force-confold flag being
> specified!)

> So I suggest that some additional output string(s), be added, to say:
> 
> D000200: conffderef in='/etc/teleport.yaml' current 
> working='/etc/teleport.yaml'
> Configuration file '/etc/teleport.yaml'
>  ==> Not modified (by you or by a script) since installation.
>  ==> Package distributor has shipped an updated version.
>  ==> Overriding --force-confold flag, since no user modification(s) to 
> preserve.
>  Installing new version of config file /etc/teleport.yaml ...

As stated above, there's no overriding going on here. And doing this
seems to me would be stating something which is wrong, and would also
be really verbose, for a condition that would make the force flags way
more confusing than they already are.

I'm thus not seeing the problem here, and I think I'll be closing this
report in a bit.

Thanks,
Guillem

Reply via email to