[pacman-dev] Hooks in pacman

Sascha Kruse knopwob at googlemail.com
Sun Jan 30 22:06:43 EST 2011

2011/1/31 Daniel Mendler <mail at daniel-mendler.de>:
> Hi
>>> I added simple hooks support to pacman yesterday. Unfortunately I have
>>> not seen before that Sascha Kruse is already working on it. My concept
>>> is simpler and similar to the scriptlets. You might want to take a look
>>> at it even though.
>> My work up to this point was pretty much useless anyway. So I'll
>> abandon my work for now and wait how this evolves.
> It wasn't my intentions to stop your efforts here. I just didn't want to
> throw away my patches, so I sent them here. Because we both want hooks
> we should combine our work :) The problem is that the patches are a bit
> different. So at first we should discuss how hooks should look like.

Yes, of course. I just tried to say that your patches look far more promising
than the one I did. If there's something i can help with,i will.

> I like the concept with the shell-functions used in the
> install-scriptlets, so I used this scheme. Furthermore I think the hooks
> should be simple, this means only on a per-package (implemented in my
> patch) and per-transaction base. All other cases can be handled on the
> script-level (filtering for files, package names, etc). Activating a
> patch is as simple as copying a file to /etc/pacman.d/hooks.

I agree with the shellfunctions.
But I'm not sure wether the filtering for packages and files should be
done within these scripts. The pro I see in putting this logic into
the scripts is that there's no need for a configuration file for the hooks
(given that we differentiate between transaction-based and package-based
hooks by a prefix/suffix in their name or something similar).

But on the other hand are the majority of usescases for hooks that
come to my mind either depending on a certain package or file.
Things like updating the font-cache or do custom stuff after a kernel

> I am very interested in opinions of the development team!
> Me too.


More information about the pacman-dev mailing list