[pacman-dev] So many HOOK puns could go here!

Allan McRae allan at archlinux.org
Fri Jul 5 11:08:09 EDT 2013

Looking at the ini parsing patch yesterday motivated me to get hooks
implemented.  But first we need to completely flesh out the details.
This is too complex of a change to make up as we go along.

>From the mention of the previous patch, you should be able to figure out
the format I am pushing...

Look here:

Questions to answer:

1) Should hooks have a defined suffix.
PRO: Avoids .pac{save,new} conflicts
CON: There should be none (adjustments made in /etc)

2) Complete list of when hooks can be run.  Current list:


I guess we should add Pre/Post suffix to Transaction for generality.
Any more needed?

3) Trigger.  In the wiki I have "File" and "Package" to specify
triggers, allowing wildcards.  These can be suffixed with
Install/Upgrade/Removal.  Note that any operation can be triggered by
using e.g "PackageInstall = *".   Does that seem general enough?

4) Should File hooks run immediately after the file or at the end of the
package.   At the end of the package fits in with out current install
scripts ad so would be easier to implement.  Can anyone think of a
situation with directly after the file is preferable?

5) How should we handle packages installing a new hook?   e.g. In Arch,
texinfo will carry the install-info hook.  I think it will still need a
post_install script to add all the info files installed before texinfo
was to the info directory, but then the hook install should be
recognised and act on any packages installed after that.  Reasonable?

6) Any other comments?

My plan is:
1) Finalise format (and I will make executive decisions here if
bikeshedding occurs...)
2) Get the ini parsing patches into shape
3) Get the parsing of hook files occuring
4) Get transaction based hooks running
5) Get pre/post file/package install hooks running


More information about the pacman-dev mailing list