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

Re: Packaging Problem (Is preinst really pre?)



Daniel,

> 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.

Why are you splitting up the package if they cannot be installed
separately? Such splits only make sense if the amount of data the
package needs warrants a separate arch-all package.

> 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.

See the Debconf manual about this: If you have shared configuration
items, put the templates into all of the packages and ask for the
configuration values in all config scripts. Only the first one will
actually show the questions, it will be skipped when the other packages
configure. The postinst should never ask any questions at all.

> 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!

Yes, because the preinst isn't even extracted at that point. All
packages that are going to be installed are configured either before any
of them is unpacked (if apt-utils is installed) or during postinst time
(if apt-utils is not installed). I believe it is also legal at any other
time in between (e.g. while the package is being unpacked in the
background).

   Simon

Attachment: pgpWNXMFVw0NP.pgp
Description: PGP signature


Reply to: