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

Re: Dependency for pre-configure script

On 3/18/23 09:19, Russ Allbery wrote:
> Antonio Russo <aerusso@aerusso.net> writes:
>> Indeed, trying to install a package with a pre-depends on certbot that
>> has a debconf debian/config file does not have certbot installed by the
>> time the debconf script starts.  This is on testing.
> See section 8 of the debconf specification:
>     The config-file contains a new element, which I call the
>     configmodule. This is a program that will determine the configuration
>     before the package is unpacked. This means it is usually run before
>     the preinst, and before the package is unpacked!
> This could definitely be clearer (and easier to find), but yes, this is
> expected behavior.
>> My question: is there a way to ensure a package is installed *before*
>> getting debconf input from the user?  Alternatively, is there a way to
>> run debconf questions during a preinst script?
> The tripwire package prompts in preinst, so that worked at some point, but
> it's for an old upgrade so I don't know if it's still working.  I think
> it's more common to prompt in postinst during configure.  I know of
> several packages that do that, although it's not considered ideal if you
> can avoid it.

I was using db_get instead of db_input in the preinst script (doh!).

Everything works fine if you just do the (correct) action in preinst or
(better still) in postinst.  I.e., if you need any dependencies, do not
try to use them in the preconfigure scripts.


Reply to: