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.)
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 ?
Ian.
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 19995.407.262369.923262@chiark.greenend.org.uk">ht tp://lists.debian.org/19995.407.262369.923262@chiark.greenend.org.uk
07-11-2011, 07:37 PM
Joachim Breitner
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?
Yes. In this case the ghc-doc trigger can only run when the ghc one has
already run.
--
.'`. Josselin Mouette
: :' :
`. `'
`-
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1310460832.13005.754.camel@pi0307572">http://lists.debian.org/1310460832.13005.754.camel@pi0307572
07-12-2011, 11:50 AM
Ian Jackson
Order of dpkg triggers
Joachim Breitner writes ("Re: Order of dpkg triggers"):
> 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.
Would it be possible for ghc-doc to update the cache too ? Then
presumably the call in ghc would have no work to do and would be fast.
Josselin Mouette writes ("Re: Order of dpkg triggers"):
> Le lundi 11 juillet 2011 à 21:37 +0200, Joachim Breitner a écrit :
> > If ghc-doc would directly Depend: on ghc, would dpkg then run the
> > triggers in the other order?
>
> Yes. In this case the ghc-doc trigger can only run when the ghc one has
> already run.
I don't think this is true. A package which has been triggered (ie,
one in triggers-pending) can still satisfy dependencies. Its the
awaiting packages (the ones which did the triggering) which don't.
So this wouldn't affect the order.
Ian.
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 19996.13576.116888.572935@chiark.greenend.org.uk"> http://lists.debian.org/19996.13576.116888.572935@chiark.greenend.org.uk
07-12-2011, 11:50 AM
Ian Jackson
Order of dpkg triggers
Joachim Breitner writes ("Re: Order of dpkg triggers"):
> 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.
Would it be possible for ghc-doc to update the cache too ? Then
presumably the call in ghc would have no work to do and would be fast.
Josselin Mouette writes ("Re: Order of dpkg triggers"):
> Le lundi 11 juillet 2011 à 21:37 +0200, Joachim Breitner a écrit :
> > If ghc-doc would directly Depend: on ghc, would dpkg then run the
> > triggers in the other order?
>
> Yes. In this case the ghc-doc trigger can only run when the ghc one has
> already run.
I don't think this is true. A package which has been triggered (ie,
one in triggers-pending) can still satisfy dependencies. Its the
awaiting packages (the ones which did the triggering) which don't.
So this wouldn't affect the order.
Ian.
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 19996.13576.116888.572935@chiark.greenend.org.uk"> http://lists.debian.org/19996.13576.116888.572935@chiark.greenend.org.uk
07-12-2011, 12:29 PM
Joachim Breitner
Order of dpkg triggers
Hi,
Am Dienstag, den 12.07.2011, 12:50 +0100 schrieb Ian Jackson:
> Joachim Breitner writes ("Re: Order of dpkg triggers"):
> > 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.
>
> Would it be possible for ghc-doc to update the cache too ? Then
> presumably the call in ghc would have no work to do and would be fast.
yes, that would be a possibility. If the Depends: does not work as Joss
said, then I’ll try this.
Am Dienstag, den 12.07.2011, 12:50 +0100 schrieb Ian Jackson:
> Joachim Breitner writes ("Re: Order of dpkg triggers"):
> > 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.
>
> Would it be possible for ghc-doc to update the cache too ? Then
> presumably the call in ghc would have no work to do and would be fast.
yes, that would be a possibility. If the Depends: does not work as Joss
said, then I’ll try this.
Joachim Breitner writes ("Re: Order of dpkg triggers [and 1 more messages]"):
> Am Dienstag, den 12.07.2011, 12:50 +0100 schrieb Ian Jackson:
> > Would it be possible for ghc-doc to update the cache too ? Then
> > presumably the call in ghc would have no work to do and would be fast.
>
> yes, that would be a possibility. If the Depends: does not work as Joss
> said, then I?ll try this.
I didn't say this before - perhaps I should have - but: I don't think
you should be adding an incorrect Depends just to deal with this
ordering problem. Installing the docs without the program is normally
a reasonable thing to do.
Ian.
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 19996.18210.299540.471858@chiark.greenend.org.uk"> http://lists.debian.org/19996.18210.299540.471858@chiark.greenend.org.uk
07-12-2011, 05:27 PM
"John D. Hendrickson and Sara Darnell"
Order of dpkg triggers
Joachim Breitner wrote:
Hi,
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.)
T the trigger pkg with do_triggers() awaits I and
it's code deals with misorder in I pkgs "if it needs to"
I the interested pkg has no idea which other pkgs may be in I without
having checked (i didn't say checking was easy, nope)
of course if Ctrl-C gets hit that's another dimension there is real system state / what is
logged in drive too.
just trying to help, John
--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4E1C83EA.1040609@cox.net">http://lists.debian.org/4E1C83EA.1040609@cox.net