Bug#527641: Package installation overwrites /etc/default/console-setup without warning
On Wednesday 20 May 2009, Raphael Hertzog wrote:
> To fix it, you have to:
> 1/ document in the file that it's auto-updated based on the debconf
> infos and that dpkg-reconfigure console-setup is recommended to update
> it 2/ use ucf or something similar to detect if the file has been
> edited by the user since last generation and avoid overwriting the file
> in that case (ucf like dpkg let the user choose what to do in that
> case)
It sounds like c-s is using debconf as a registry. If that is the case, it
is just plain wrong. Configuration scripts should read the current
settings from the configuration file(s) and set the defaults for debconf
questions based on that, and not just display the current value in the
debconf database.
From debconf-devel(7):
[...] The issue to watch out for here is that debconf is not
intended to be, and must not be used as a registry. This is unix
after all, and programs are configured by files in /etc, not by
some nebulous debconf database (that is only a cache anyway and
might get blown away). [...]
See also the example under "Config file handling" in the same man page.
Cheers,
FJP
Reply to: