Re: Installing missing conffiles (was Re: dpkg no longer installs conffiles??)
Hi! On Wed, 2016-11-30 at 20:25:05 +0100, Sven Joachim wrote: > On 2016-11-30 14:16 +0100, Guillem Jover wrote: > > On Tue, 2016-11-29 at 19:18:41 +0100, Simon Richter wrote: > >> To force reinstallation of configuration files, invoke dpkg with the > >> "--force-confmiss" option when installing. This will only restore > >> missing configuration files, but not overwrite changed ones. If some > >> configuration files were damaged, you can use "--force-confnew" to > >> unpack all configuration files; your old files can be found with a > >> ".dpkg-old" suffix then. > > > > This is I guess, an extended misconception, --force-confmiss will only > > install missing conffiles if they are missing AND the conffile changes > > in the new package relative to the one installed (as documented in the > > man page). > > Really? This is not what I see here. Oh wow! Thanks for checking, tracking this down and filing #846395. :) So it seems I introduced incorrect wording into the man page description for the --force-confmiss option some time ago, and then believed my own fantasy, and have been living since in this parallel universe, where me and the documentation were right, and the actual behavior and the rest of the world were wrong. I'll fix the man page and also add regression tests so that this does not get accidentally changed in the future due to wrong documentation. Thanks, Guillem
Re: Installing missing conffiles (was Re: dpkg no longer installs conffiles??)
On 2016-11-30 14:16 +0100, Guillem Jover wrote: > On Tue, 2016-11-29 at 19:18:41 +0100, Simon Richter wrote: >> To force reinstallation of configuration files, invoke dpkg with the >> "--force-confmiss" option when installing. This will only restore >> missing configuration files, but not overwrite changed ones. If some >> configuration files were damaged, you can use "--force-confnew" to >> unpack all configuration files; your old files can be found with a >> ".dpkg-old" suffix then. > > This is I guess, an extended misconception, --force-confmiss will only > install missing conffiles if they are missing AND the conffile changes > in the new package relative to the one installed (as documented in the > man page). Really? This is not what I see here. , | # rm /etc/skel/.profile | # dpkg -i --force-confmiss /var/cache/apt/archives/bash_4.4-2_i386.deb | (Reading database ... 13631 files and directories currently installed.) | Preparing to unpack .../archives/bash_4.4-2_i386.deb ... | Unpacking bash (4.4-2) over (4.4-2) ... | Setting up bash (4.4-2) ... | | Configuration file '/etc/skel/.profile', does not exist on system. | Installing new config file as you requested. | [...] | # ls -l /etc/skel/.profile | -rw-r--r-- 1 root root 675 Nov 15 18:49 /etc/skel/.profile ` IIRC --force-confmiss has always installed missing conffiles without asking, and it's much older than --force-confask. Cheers, Sven
Re: Installing missing conffiles (was Re: dpkg no longer installs conffiles??)
On Wed, 30 Nov 2016, Guillem Jover wrote: > On Tue, 2016-11-29 at 19:18:41 +0100, Simon Richter wrote: > > To force reinstallation of configuration files, invoke dpkg with the > > "--force-confmiss" option when installing. This will only restore > > missing configuration files, but not overwrite changed ones. If some > > configuration files were damaged, you can use "--force-confnew" to > > unpack all configuration files; your old files can be found with a > > ".dpkg-old" suffix then. > > This is I guess, an extended misconception, --force-confmiss will only > install missing conffiles if they are missing AND the conffile changes > in the new package relative to the one installed (as documented in the > man page). > > What you probably want is --force-confask --force-confmiss. Please document this as an example in the manpage? -- Henrique Holschuh
Installing missing conffiles (was Re: dpkg no longer installs conffiles??)
On Tue, 2016-11-29 at 19:18:41 +0100, Simon Richter wrote: > To force reinstallation of configuration files, invoke dpkg with the > "--force-confmiss" option when installing. This will only restore > missing configuration files, but not overwrite changed ones. If some > configuration files were damaged, you can use "--force-confnew" to > unpack all configuration files; your old files can be found with a > ".dpkg-old" suffix then. This is I guess, an extended misconception, --force-confmiss will only install missing conffiles if they are missing AND the conffile changes in the new package relative to the one installed (as documented in the man page). What you probably want is --force-confask --force-confmiss. Thanks, Guillem