[pacman-dev] package file hooks
Allan McRae
allan at archlinux.org
Thu Aug 21 06:53:38 EDT 2008
Xavier wrote:
> I was recently considering to implement package file hooks.
> <snip>
>
> But today I felt on this :
> http://www.linux.com/feature/144666
> And this looks great, this feature might not even need to be
> implemented in pacman.
> But well, I don't know how well it would work in practice. It is just
> an idea to discuss about
This is actually quite awesome... Just adding this command to the
incron table:
/usr/share/info IN_CLOSE_WRITE /home/allan/hook/infoadd.sh $@/$#
calls my infoadd "hook" script:
#!/bin/bash
install-info $1 /usr/share/info/dir
and any time I install a package with info pages they get added to the
info index! Of course you would also need to add remove "hooks" too.
However, the BIG, BIG downside of this is that packages that want to use
these hooks would require the user is running the incron daemon which I
am very much against. For this reason, I think it would be much better
to implement this in pacman. Also, consider e.g. adding fonts. You
don't want to update the font cache once per install and not for every
file added.
So I think a more general hooks mechanism in pacman is the way to go here.
Allan
More information about the pacman-dev
mailing list