[Debconf-devel] Bug#352697: [debconf-doc] Bug in configuration file handling example

Thorsten Glaser tg at debian.org
Sun Mar 25 15:34:30 UTC 2018

On Wed, 24 Sep 2008, jre-phoenix wrote:

> Therefore I moved all code from debian/config to debian/postinst. This
> makes sure that after every debconf run (read configuration files,
> store answers in debconf db, ask questions and store answers in
> debconf db) the answers are written immediately to the configuration
> file.

This breaks the following use case:

The package is already installed and configured with debconf.
The user then goes and uses debconf-set-selections to provide
new values to the debconf database and uses dpkg-reconfigure
-fnoninteractive $packagename to enact them.

In this case, the values from the filesystem MUST NOT override
the values from the database (which is probably why this was
only intended to be run from the preinst script).

Unfortunately, there seems to not be a standard way to handle
this, as debconf’s requirement to use values from the filesystem
over values from the database (for all other cases) is already
grossly misunderstood and under-implemented by many packages.

For the specific case of console-setup I managed to fix this
by changing console-setup/store_defaults_in_debconf_db to false
in the selections text file. (Incidentally, I found this bug‐
report referenced in its config file, which I had to manually
read to figure this out.)

I think we need better education of package maintainers wrt.
how debconf is supposed to be used including all such use
cases and the w̲hy for how some things are.

15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)

More information about the Debconf-devel mailing list