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

dpkg enhancements for better debconf support



Doogie asked me to send in a list of ways dpkg could better support
debconf. In rough order of usefulness:

1. Run config script under debconf before running postinst script of
   package, passing in appropriate arguments. /usr/bin/debconf takes a
   script to run under debconf and arguments to pass to the script as
   parameters, and this is what it was designed for. 
   
   Benefits include me being able to get rid of a load of gross code in
   debconf that works out the config script to run (grossly handling
   things like config script running before a preinst, by hardcoding in
   where dpkg currently unpacks a package control info into tmp.ci).
   Also, it would eliminate the requirement that postinst scripts do
   special stuff to let debconf hook in and run the config script.

   An old patch to do this is
   http://lists.debian.org/debian-dpkg/2001/debian-dpkg-200102/msg00003.html
   Also has useful discussion of why it may be better to run the
   config script after the preinst, not before it.

2. Somehow work out which regular maintainer scripts expect to
   communicate with debconf, and run them under /usr/bin/debconf. This
   would eliminate gross hackery in the current 
   ". /usr/share/debconf/confmodule" mechanism, which currently involves
   re-execing the maintainer script that calls it. This would probably
   be best implemented as a new control file field, something like
   "Debconf-MaintScript: postinst postrm"

3. Add a new status field or state so that dpkg can track which packages
   have had their config script run already (and which version of it) and
   skip re-running the config script. This would merely cut down on
   duplicate runs of the idempotent config scripts when a package is
   preconfigured before dpkg runs.

-- 
see shy jo

Attachment: pgpDk2jaSk4W9.pgp
Description: PGP signature


Reply to: