Hello,

Christian Perrier wrote a blog about dpkg triggers[1], titled "triggers:
those great improvements Joe User will never see". He pointed out that
it's a kind of great(*2) feature that will be unnoticed by end users. 

That's true, IMHO. The funny (and *angering*) thing is, those users who
actually notice triggers are likely to complain :

 "Why the Hell do you run those triggers, it wastes my time !"

No matter if it actually save their time, since it's ran once for all
packages, rather than once per package. What users will notice it that
something is ran after the package *is installed* (from their POV), so
it can be perceived as a waste of time.

My point now : We should make sure they aren't right !

i.e We should be careful not to add lots of new triggers for doing new
stuffs, that eventually makes the installation to take longer. We can
still defer actions in the background by other means, like cron.

I've included some figures for man-db, as an example below (*3). (Thanks
to Colin Watson who maintain that other feature Joe User will never
notice).

Thanks to every one who worked on this trigger thing.
 
Franklin


----

[1] http://www.perrier.eu.org/weblog/2008/06/25#triggers
*2) Don't argue here, the discussion already occurred. I'm referring to 
    the concept of delaying some actions, so it's only ran once for
    all installed package, in order to save time.
*3) Example of delayed triggers, man-db figures :

Foreword : I'm not blaming the maintainer, Colin Watson, as I can't make
my mind on whether it should have been enabled or not (plus see
Bug:#133917). Being able to opt-out would be great, but triggers don't
seem to allow that currently.

On Etch, /var/cache/man/index.db was not updated at installation, but
with a cron job. In Lenny, it will be triggered right after packages
installation :

etch:~# time dpkg -i /var/cache/apt/archives/manpages_2.39-1_all.deb 
Selecting previously deselected package manpages.
(Reading database ... 53054 files and directories currently installed.)
Unpacking manpages (from .../manpages_2.39-1_all.deb) ...
Setting up manpages (2.39-1) ...

real 0m0.230s
user 0m0.080s
sys 0m0.040s

sid:~# time dpkg -i /var/cache/apt/archives/manpages_3.00-1_all.deb 
Selecting previously deselected package manpages.
(Reading database ... 26933 files and directories currently installed.)
Unpacking manpages (from .../manpages_3.00-1_all.deb) ...
Setting up manpages (3.00-1) ...
Processing triggers for man-db ...

real 0m0.474s
user 0m0.104s
sys 0m0.152s

Now sid, with man-db triggers disabled :

sid:~# time dpkg -i /var/cache/apt/archives/manpages_3.00-1_all.deb 
Selecting previously deselected package manpages.
(Reading database ... 26928 files and directories currently installed.)
Unpacking manpages (from .../manpages_3.00-1_all.deb) ...
Setting up manpages (3.00-1) ...

real 0m0.185s
user 0m0.052s
sys 0m0.036s



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to