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

Re: Draft spec for new dpkg "triggers" feature (v2, repost)



Roberto C. Sánchez writes ("Re: Draft spec for new dpkg "triggers" feature (v2, repost)"):
> On Tue, Apr 10, 2007 at 07:27:06PM +0100, Ian Jackson wrote:
> > When a trigger is activated, it becomes pending for every package
> > which is interested in the trigger at that time.  Each package has a
> > list of zero or more pending triggers.  Repeated activation of the
> > same trigger has no additional effect.  Note that in general a trigger
> > will not be processed immediately when it is activated; processing is
> > deferred until it is convenient (as described below).
> 
> Will the idempotency be implemented by dpkg or by each interested
> packaged?  That is, does dpkg keep track and simply not activate the
> trigger subsequent times, or is it the responsibility of the maintainer
> of the interested package to make sure that repeated activations don't
> cause problems?

Both.  That is, dpkg will coalesce multiple activations (where it
can), but the package must also ensure that trigger processing is
idempotent (for the cases where dpkg must run it more than once).

> > When a package T activates a trigger in which an package I is
> > interested, I is added to the list of packages whose trigger
> > processing is awaited by T.  Zero or more packages I may be added as a
> > result of any particular trigger activation, depending on how many
> > packages were interested.
> 
> If the interested package fails to exit successfully from whatever it
> does for its trigger, how is that treated?  Does dpkg continue and note
> the error to the user?  I am thinking that you don't want such a failure
> to prevent the triggerring package from finishing to install and
> configure.

T will remain in triggers-awaited (ie, not considered correctly
installed and not satisfying dependencies) until I is successfully
configured (or removed).  This is covered in `Details - triggering
package' of v3 of the spec document.

> > The activation of a trigger does not record details of the activating
> > event.  For example, file triggers do not inform the package of the
> > filename.  In the future this might be added as an additional feature,
> > but there are some problems with this.
> 
> I'd be interested to know in what problems there are with this.

These have been discussed fairly extensively on debian-dpkg.

Ian.



Reply to: