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

Re: Packaging Problem (Is preinst really pre?)

On Thu, Sep 19, 2002 at 11:01:13AM -0400, Daniel Whelan wrote:
> I'm trying to create a package, that among other things, sets some
> configuration information for other packages. The overall purpose is to
> install this one package, which configures everything exactly how it
> should be prior to installing other packages.

> So, in the preinst for this package, I use db_set to set the debconf
> variables for some packages, then expect the packages to be installed
> (they are listed as Depends: in the control file), then make some manual
> configuration changes in the postinst. So, my question is, is this the
> proper way to be going about doing this? (I ask because the other
> packages are prompting me for configuration prior to the preinst being
> run, so it isn't working how I'd like it to). Thanks!

First, if you use debconf in the preinst, you must have a Pre-Depends: on
the relevant package (namely, debconf).  Second, if you do have debconf
installed ahead of time, then yes, the preinst isn't actually as early as
you want it.  You should do most of your preloading and prompting of
values in a config script, which will be run first thing by apt if you
have debconf installed, or from within the postinst script when you
initialize debconf if it wasn't installed.

The .config script follows the same basic rules as the rest of the
maintainer scripts, except that it's intended specifically for debconf-y
stuff.  Anything else should go in the {pre,post}{inst,rm}.

Steve Langasek
postmodern programmer

Attachment: pgpPnyw3CGDQe.pgp
Description: PGP signature

Reply to: