You are not logged in.
Upstream for the aur openrc package i am co-maintainer of has decided to split of some functionality into a separate package [1] .
I am writing a PKGBUILD for the new package and realised i need to execute 2 commands after installation, and upon removal of the package those commands should be reversed.
These commands are specific to this package and I doubt they are usable for other packages.
In the past i would have used the post_install / post_remove functions of a .install-file for this.
We do have pacman hooks now and i could use them.
Since the commands differ i expect to need 2 pacman hooks .
Which would be better in this case, one .install-file or 2 pacman hooks ?
[1]https://github.com/OpenRC/openrc/blob/master/NEWS.md , OpenRC-0.23
Last edited by Lone_Wolf (2017-03-13 12:10:40)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
These commands are specific to this package and I doubt they are usable for other packages.
That removes the main reason to use a hook.
So don't use a hook unless the commands specifically have to be run after all transactions have occurred (which is something install scripts are incapable of). mkinitcpio is a good example of where this matters.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thanks,
that confirms my feeling this use-case is best served by a .install-file .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline