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

Re: triggers question



Hi,

On Sun, 2008-03-30 at 15:10:42 -0400, Joey Hess wrote:
> Here's what I'm seeing with the new dpkg when I install packages that
> contain menu files and that also run update-menus in their postinsts:
> 
> Unpacking xaos (from .../archives/xaos_3.3-1_i386.deb) ...
> Selecting previously deselected package xemeraldia.
> Unpacking xemeraldia (from .../xemeraldia_0.4.1-4_i386.deb) ...
> Processing triggers for menu ...
> Setting up xaos (3.3-1) ...
> Setting up xemeraldia (0.4.1-4) ...
> Processing triggers for menu ...
> 
> Note the dual trigger run. The first time occurs after the packages are
> unpacked, when the /usr/share/menu files are updated. The second time
> occurs after the postinsts run, since they trigger again by running
> update-menus.

> Of course once all packages are updated to drop the update-menus calls,
> the trigger will only run once per dpkg invocation of a menu-providing
> package. So this is temporary. It's also probably fine to run
> update-menus trice for a while. Just wanted to make sure this is
> as-indended, since I don't remember realizing this would happen when I
> read the original triggers documentation.

Yes, seems correct.

> BTW, there seems to be a typo in triggers.txt:
> 
>    A file trigger is guaranteed to be activated before the file in
>                                                 ^^^^^^
>    question is modified by dpkg; on the other hand, a file trigger might
>    be activated even though no file was actually modified.
> 
> AFAICS, the file trigger runs AFTER the file is modified. It would
> not be very useful to run it before the file was modified!

Activation does not imply immediate processing.

regards,
guillem


Reply to: