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

Re: Order of dpkg triggers



Hi,

Am Montag, den 11.07.2011, 14:58 +0100 schrieb Ian Jackson:
> Joachim Breitner writes ("Order of dpkg triggers"):
> > just wondering: Is there a way to ensure the ordering of dpkg trigger
> > runs? In my case, I?d like to ensure that the ghc trigger is always run
> > before the ghc-doc trigger, if both packages are installed, to avoid a
> > warning. (The packages do not directly depend on each other.)
> 
> In general the order of triggers is controlled by dependencies.
> 
> Can you explain in a bit more detail what your packets are doing and
> why the arbitrary order you currently see is a problem ?

ghc is the Haskell compiler. Haskell libraries ship package descriptions
in /var/lib/ghc/package.conf.d/, and this package data base can be
queried using the ghc-pkg tool. For efficiency, "ghc-pkg recache" is
called in ghc’s trigger to create a cache file. If this cache file is
not up to date, ghc-pkg still works correct, just slower, and emits a
warning.

ghc-doc is the corresponding documentation package. Besides shipping the
documentation for the basic packages, it also maintains a system-wide
index of installed libraries. To that end, it’s trigger uses ghc-pkg, if
it is available, to get a list of installed packages and then create the
index.

Now if both packages are installed, and a new haskell library is being
installed, it can happen that ghc-doc’s trigger runs first, hence it
uses ghc-pkg with an outdated cache, which emits a warning.

If ghc-doc would directly Depend: on ghc, would dpkg then run the
triggers in the other order?

Greetings,
Joachim


-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: