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

Dependency for pre-configure script



Hello,

I'm trying to perform a task during debian/package.config which
requires another package to be installed.  I initially thought
pre-depends would be strong enough, because [1] describes it by:

    This field is like Depends, except that it also forces dpkg to
    complete installation of the packages named **before even starting
    the installation of the package which declares the pre-dependency,**
    as follows:

(my emphasis).  However, reading the next paragraphs does not appear to
indicate any requirements are attempted to be satisfied before debconf/
pre-configure questions are asked (only preinst, unpack, and configure
are explicitly mentioned).

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.

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?  Just doing

  db_get package/template
  db_go

doesn't seem to work (it does nothing?). Am I doing something wrong? Is
there a preferred way to do this?

Best,
Antonio

[1] https://www.debian.org/doc/debian-policy/ch-relationships.html


Reply to: