[pacman-dev] Pacman Hooks file format

Allan McRae allan at archlinux.org
Sun Jan 11 07:26:47 UTC 2015


On 02/01/15 21:21, Sam S. wrote:
> Hi pacman devs!
> 
> Allan pointed me to
> https://wiki.archlinux.org/index.php/User:Allan/Pacman_Hooks in his
> blog comments, and I think it's great that such hooks will be added to
> pacman (hopefully for the next release)!
> 
> I've got a small suggestion for the file format for specifying the
> hooks. If it is already set in stone please disregard this email; This
> is just in case it's still open to brainstorming:
> 
> Did you consider separating the options by whether they define the
> trigger, or specify the action to be run for each instance where the
> hook was triggered?
> This might make the format more self-explanatory, and more extensible
> in case support for more complicated triggers/actions is added in the
> future.
> 
> So instead of:
> 
>     [Hook]
>     Description = Add info files to the info directory
>     Type = PostTransaction
> 
>     [Target]
>     File = /usr/share/info/*
>     Exec = install-info %f /usr/share/info/dir &>/dev/null
> 
> It might read:
> 
>     [Hook]
>     Description = Add info files to the info directory
> 
>     [Trigger]
>     FileInstalled = /usr/share/info/*
> 
>     [Action]
>     Stage = PostTransaction
>     Exec = install-info %f /usr/share/info/dir &>/dev/null
> 

the hooks format is still not set in stone.  Thanks for the suggestion.

A


More information about the pacman-dev mailing list