FS#33771 - Big feature requests: combine bookkeeping tasks when installing/updating multiple packages

Attached to Project: Pacman
Opened by Rulatir (Rulatir) - Friday, 08 February 2013, 17:26 GMT
Last edited by Dave Reisner (falconindy) - Friday, 08 February 2013, 17:46 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 4.0.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I would like to propose a new Big Feature for pacman: a framework for buffering and combining common "bookkeeping" tasks when syncing multiple packages. Based on investigating just one offender, gtk-update-icon-cache, I foresee that implementing this feature will provide an order of magnitude performance boost for -S.

The feature would be opt-in for packages. I suggest a separate program, let's name it pacman-after-sync. Instead of calling gtk-update-icon-cache directly in the install script, the author of the install script would write:

pacman-after-sync -t $TRANSACTION -c gtk-uptade-icon-cache <arguments>

(The $TRANSACTION variable would have been set by pacman). This program would log the command and arguments following the -c switch to some buffer identified by the value of the -t parameter, and then after syncing all packages pacman would issue:

pacman-after-sync -t <the same transaction id> --flush

The new program would then combine identical lines in the buffer identified by the value of the -t parameter and issue each of them once, preserving the order of last occurrence. As an example result, gtk-update-icon-cache would probably be run *once*, not 300+ times, when syncing the whole KDE (provided the maintainer of each package chose to use pacman-after-sync).
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 08 February 2013, 17:46 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#2985 
Comment by Daniel Wallace (gtmanfred) - Friday, 08 February 2013, 17:35 GMT
https://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks

this sounds very similar to pacman hooks

Loading...