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

jre-phoenix jre-phoenix at users.sourceforge.net
Wed Sep 24 16:49:31 UTC 2008


Package: debconf-doc
Version: 1.5.22

--- Please enter the report below this line. ---

This is still related to debconf-devel(7):
"Config file handling
Many of you seem to want to use debconf to help manage config files
that are part of your package. ..."

The problem described by Anton Zinoviev occurs more often:
When you install a package with aptitude or apt-get, then debconf will
run two times:
On the first run you are asked the questions.
On the second run the values from the configuration file are stored
into the debconf db. So they overwrite the given answers. Since the
questions were already asked this happens in the background, without
the user noticing what's going wrong.

(BTW, this problem does not occur when you install a package with "dpkg -i").

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.

Still, I'm sure you had your reason to use a separate file
debian/config - so I'm not sure about any drawbacks for this solution.

Any feedback would be welcome! And thanks for debconf :)
jre


$ dpkg -l apt aptitude dpkg | grep ^ii
ii  apt                                    0.7.14+b1
               Advanced front-end for dpkg
ii  aptitude                               0.4.11.8-1
               terminal-based package manager
ii  dpkg                                   1.14.22
               Debian package management system





More information about the Debconf-devel mailing list