INFRA Signal 407
On Arch Linux scripts and hooks
An article examines the two mechanisms Arch Linux uses for system integration during package transactions, alpm-install-scriptlet files and alpm-hooks, and evaluates their tradeoffs for package maintainers.
Understanding the distinction between scriptlets and hooks directly affects how reliably packages install, upgrade, and remove on Arch systems, especially when operations depend on external executables or cross-package ordering. The article identifies concrete failure modes in the current scriptlet approach that maintainers should account for.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
alpm-install-scriptlets run per-package within a transaction and have no way to declare runtime requirements, meaning executables they call may not yet exist on the target system.
alpm-hooks run before or after the entire transaction rather than per-package, making them suitable for operations like cache rebuilding that should happen once all packages are in place.
Scriptlets cannot reliably create users or groups with dynamic IDs because those values must be hardcoded at package build time.
THE CLUSTER