[Debconf-devel] problem with debconf and auto-guessing config

Arthur de Jong adejong at debian.org
Thu Nov 13 21:27:23 UTC 2008

On Wed, 2008-11-12 at 00:02 +0100, Arthur de Jong wrote:
> Thanks for the quick reply. The downside of that would be that the
> questions would be asked during installation and not during
> preconfigure.

I found a way that works well enough for me. What it basically boils
down to:

- in the templates file do not include any Default lines (or make them
- only fill in default values from the environment if the current
  debconf value is empty
- if reading an existing configfile (no guessing) load the values from
  the configfile unconditionally into debconf

This allows preconfiguring (since the environment defaults are picket up
only once), preseeding (no environment defaults are picked up at all)
and reconfiguring (a configfile should already be present).

It may be a bit of a hack. If dpkg-reconfigure would decide to run the
config script twice it would fail. Another problem I can think of is
that it may not work correctly with debconf values that could be empty
but instead of the empty value a marker value could be used. This
solution seems to work well enough for me though.

-- arthur - adejong at debian.org - http://people.debian.org/~adejong --
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20081113/80233ed6/attachment.pgp 

More information about the Debconf-devel mailing list