[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debconf and cdebconf are coinstallable now



Joey has been campaigning [1] for a while to get everything in the
archive changed to depend on debconf | debconf-2.0 or similar rather
than just debconf, in order that we can start rolling out cdebconf as
its replacement. Like most jobs that involve touching the bulk of the
archive, this looks set to take quite a while, as the list of bugs [2]
should indicate.

Recently it occurred to me that we didn't necessarily have to do it that
way round. I've shuffled things around in the cdebconf package so that
it no longer has any file conflicts with debconf or debconf-doc, and
changed the debconf confmodule to fire up the cdebconf frontend rather
than its own if the DEBCONF_USE_CDEBCONF environment variable is
non-empty. These changes have been in unstable for about a month, as of
debconf 1.4.70 and cdebconf 0.96. This allows you to install cdebconf,
set that environment variable, and play around with cdebconf with
relative ease; when we come to switch to cdebconf for real, instead of a
huge conflicting mess that apt will probably have trouble resolving,
it'll just be a matter of changing a couple of lines in
/usr/share/debconf/confmodule.

Of course, don't expect cdebconf to be a complete working replacement
for debconf just yet; if you try using it for a dist-upgrade run it'll
fall over. Due to its d-i heritage, it doesn't yet load templates
automatically; that has to be done by hand. Frontend names differ from
debconf's, which will need some migration code. At the moment it can
only handle UTF-8 templates, which are mandated in the installer but
only optional in the rest of the system. It doesn't have all of
debconf's rich array of database modules. The list goes on. However, I
think we at least stand a chance of getting a handle on the problem now.

For those developers who want to try this out, the following should set
up a reasonable initial cdebconf templates database (with the exception
that non-UTF-8 templates will generate a warning and be ignored):

  find /var/lib/dpkg/info -name \*.templates | \
    sed 's,.*/\(.*\)\.templates,\1 &,' | \
    xargs -L1 /usr/lib/cdebconf/debconf-loadtemplate

You can then set DEBCONF_USE_CDEBCONF=1 in the environment and/or use
the programs in /usr/lib/cdebconf to try things out. Of course, I
recommend against trying this for package installations or upgrades on a
production system; using a chroot to play with that sort of thing might
be a good idea.

(I meant to repost this from
http://riva.ucam.org/~cjwatson/blog/debian/2006-01-27-debconf-cdebconf-coinstallable.html
a little while ago, but forgot. Sorry for the delay.)

[1] http://lists.debian.org/debian-devel/2005/08/msg00136.html
[2] http://bugs.debian.org/328498

Cheers,

-- 
Colin Watson                                       [cjwatson@debian.org]



Reply to: