[arch-general] Can I prevent Pacman from running hooks?

Tobias Hunger tobias.hunger at gmail.com
Sat Oct 13 08:11:10 UTC 2018


Hi Arch Community,

I have scripts that will install a set of arch linux machines for me
with all the tweaks I want. These scripts run pacman a lot to install
bits and pieces. Usually the script will running pacman to install one
package and then configure that package and then proceed to install
the next (set of) packages. This works great, but  a noticeable part
of the run time is spent on running pacman hooks (e.g. to update the
man-db and similar things).

So I am wondering: Is it possible to stop pacman from running hooks
during package installation? I do know when it is "safe" to not run
hooks (when the system is not complete yet) and when I need to run all
of them (right after the system has all packages installed that it
will have).

So far I run pacman with a --hookdir that contains symlinks to
/dev/null named like some of the more expensive hooks that tend to
take long to complete. But a --no-hooks option to pacman would be
great for my use case.

Is it possible to run pacman without it triggering hooks?

Best Regards,
Tobias


More information about the arch-general mailing list