In Ubuntu 12.10, we added support for reporting questions asked during package installation as error reports.

These debconf prompts are often shown in error. Ubuntu has a long history of bugs where such prompts are incorrectly shown, or worse, buried inside a hidden terminal window.

They are also poor UI. For example, when upgrading via update-manager, rather than ask the user if they want to restart a number of services they are entirely unfamiliar with due to a new libc installation, the services should just be restarted.

Hacking on the interface

The UI for these prompts lives in the debconf package:

bzr branch lp:ubuntu/debconf debconf

The main entry point for the GTK UI is Debconf/FrontEnd/ via Debconf/ The UI for the individual question types (string, password, boolean, etc) live under Debconf/Element/Gnome. This page serves as a decent introduction to how debconf works.

Unit tests live in Test. You can run all the tests with ./ --all or just the GTK tests with ./ Test::Debconf::Gnome.

It's often useful to have a quick command to test changes with. The following will copy the existing debconf database off to a safe location, then resinstall the nullmailer package (which has a couple of debconf questions), using the UI code from the current working directory:

cd debconf
cp /var/cache/debconf/config.dat /tmp
sudo cp /tmp/config.dat /var/cache/debconf; sudo PERL5LIB=. DEBIAN_FRONTEND=gnome apt-get --reinstall install nullmailer

Every time you want to test a change, just run the last line mentioned above.

You may want to add the following to the top of the module you're working on, to get the entire stack trace on error rather than just the first line:

use diagnostics;

ErrorTracker/Contributing/Debconf (last edited 2012-07-09 15:12:09 by ev)