FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 07-11-2011, 11:00 AM
Joachim Breitner
 
Default Order of dpkg triggers

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

Thanks,
Joachim

--
Joachim "nomeata" Breitner
Debian Developer
nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata
 
Old 07-11-2011, 01:58 PM
Ian Jackson
 
Default Order of dpkg triggers

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
 
Old 07-11-2011, 07:37 PM
Joachim Breitner
 
Default 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
 
Old 07-12-2011, 08:53 AM
Josselin Mouette
 
Default Order of dpkg triggers

Le lundi 11 juillet 2011 * 21:37 +0200, Joachim Breitner a écrit :
> 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
 
Old 07-12-2011, 11:50 AM
Ian Jackson
 
Default 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
 
Old 07-12-2011, 11:50 AM
Ian Jackson
 
Default 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
 
Old 07-12-2011, 12:29 PM
Joachim Breitner
 
Default 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.

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
 
Old 07-12-2011, 12:29 PM
Joachim Breitner
 
Default 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.

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
 
Old 07-12-2011, 01:07 PM
Ian Jackson
 
Default Order of dpkg triggers

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
 
Old 07-12-2011, 05:27 PM
"John D. Hendrickson and Sara Darnell"
 
Default 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.)

Thanks,
Joachim



i'm not a maintainer but...

deb-triggers(6), /usr/share/doc/dpkg-dev/triggers.txt.gz

if I remember correctly

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
 

Thread Tools




All times are GMT. The time now is 01:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org