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

Doug Newgard scimmia at archlinux.org
Sat Oct 13 08:15:10 UTC 2018


On Sat, 13 Oct 2018 10:11:10 +0200
Tobias Hunger via arch-general <arch-general at archlinux.org> wrote:

> 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

Some hooks take into account the specific files that were installed, so you
cannot run them later. Why not just install everything at once?


More information about the arch-general mailing list