Re: dpkg -i question
On 2009-08-05 09:38 +0200, Hinko Kocevar wrote:
> I've started using dpkg in the company I work for now. Before that I
> was not familiar with the tool.
> My question is in regard to the fact when/how are files installed in
> /etc/default when I run 'dpkg -i pkg.deb'.
>
> What I've observed is that missing or modified file in /etc/default is
> never installed or replaced, even when missing on the filesystem and
> present in the deb package.
This is a feature, files below /etc shipped in packages are "conffiles"¹
that the sysadmin is free to modify and even delete. If you choose the
latter, dpkg will not bring the files back on upgrades which would
override your decision.
> If file in /etc/default is missing it can be forced with 'dpkg
> --force-all -i pkg.deb', that works.
Actually the option you want is --force-confmiss, --force-all is pretty
dangerous.
> This is not the case for eg. files placed in /opt/bin (the same
> package).
Because these files are not conffiles and do not get the same special
treatment.
Sven
¹ Technically, conffiles are listed in the package, see dpkg(1) for
details. You could ship conffiles outside /etc and files under /etc
that are not conffiles, but both would be considered as serious bugs
in Debian.
Reply to: