[pacman-dev] Fwd: What is passed to a hook's Action?
andrew.gregory.8 at gmail.com
Fri Apr 29 19:52:39 UTC 2016
On 04/29/16 at 03:46pm, Eric Schultz wrote:
> I've looked at the docs for alpm-hooks. I even tried looking at the code
> but I'm not a C programmer so a lot didn't make sense to me.
> What I'm wondering is what gets passed to the command in Exec of a hook?
> And how is it passed? Are there variables we can put on the command line to
> be passed as parameters? Does everything come through stdin? Or nothing at
> Looking at andrewgregory's pachooks github repository, info-install.hook in
> particular, I get the impression things are passed via stdin. But I'm
> looking for some official docs or word from the developers to go on.
alpm-hooks(5) says explicitly how targets are passed to hooks:
Causes the list of matched trigger targets to be passed to the
running hook on stdin.
If you don't use NeedsTargets, nothing gets passed to the hook.
More information about the pacman-dev