1

I am curious as to what triggers post-transaction hooks in pacman and whether it is possible to see what hooks are being called for a particular package and with what parameters.

For example, I just installed a custom-build of Wine and there are some errors relating to one of the post-transaction hooks:

:: Running post-transaction hooks...
(1/2) Registering binary formats...
/usr/lib/rc/sh/binfmt.sh: line 33: /proc/sys/fs/binfmt_misc/: Is a directory
/usr/lib/rc/sh/binfmt.sh: line 35: echo: write error: Invalid argument
binfmt: invalid entry on line 3 of `/usr/lib/binfmt.d/wine.conf'
error: command failed to execute correctly
(2/2) Updating the desktop file MIME type cache...

Where can I find exactly what is being called for that binary format hook? Are the hook calls specified somewhere in the PKGBUILD file?

1 Answer 1

3

You will find most of the answers in man 5 alpm-hooks. There seems to be a bit of disconnect in the documentation and this manual page is only mentioned in the "SEE ALSO" section of the manual pages of pacman and libalpm(3) (the Arch Linux Package Management (ALPM) library, which pacman is a front end to).

Hooks are specified by .hook text files installed by packages themselves in the default directory used by libalpm, which is /usr/share/libalpm/hooks, or in additional directories listed in pacman.conf.

All the hooks whose TRIGGERS section(s) includes conditions that match the current pacman transaction are run.

The Exec directive in each hook's ACTIONS section specifies the command to run, including its arguments.

See also the relevant paragraph on the Arch Wiki.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.