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

Re: Draft spec for new dpkg "triggers" feature



Hi,

Ian Jackson <ian@davenant.greenend.org.uk> wrote:

>> Couldn't dpkg just run the trigger muliple times (like xargs) if it came
>> to that?
>
> Yes, I suppose it could, but that has its own downsides.  In
> particular, it will often be the case that some or all of the triggers
> a package is interested in will cause identical postinst behaviour,
> which would end up being repeated.

Since Joey mentioned xargs, I think he didn't suggest to run the
postinst with the "triggered" argument once for each pending trigger
but, in cases of exceptionally long trigger lists, to break them into
pieces, which would still be very long, but at least acceptable for a
command line. For instance, if the list of pending triggers consists of
2050 elements and the maximum number of command-line args we can pass
after "postinst triggered" is 2046 (just making up a number here), then
the first call of "postinst triggered" would list 2046 triggers and the
second one 4 triggers.

As these really look like extreme cases, maybe it's not a big deal that
"postinst triggered" is run several times here, probably only 2 (the
case in the example).

-- 
Florent



Reply to: