Allan McRae
3802cab563
Collect all triggered hooks before running them
...
Having a first pass that checks which hooks are triggered followed by a
second pass of the triggered hooks allows us to only provide output when
a hook is actually triggered.
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-12-15 15:03:14 +10:00
Andrew Gregory
5312e683fc
hooks: pass matched targets to hooks
...
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-28 22:53:24 +10:00
Andrew Gregory
8ad893732d
allow specifying input to scriptlets
...
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-28 22:52:11 +10:00
Andrew Gregory
b42d0852f3
allow arguments in hook Exec fields
...
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-11-28 16:26:51 +10:00
Andrew Gregory
dcc1b22cb3
_alpm_hook_run: check path length before copying
...
If a hook path equals or exceeds PATH_MAX characters the path will be
left unterminated. Pre-calculating the path length also allows us to
use the more efficient memcpy over strncpy.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-28 14:22:09 +10:00
Andrew Gregory
5b6526a2ad
hook.c: print invalid option name
...
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-27 19:38:57 +10:00
Andrew Gregory
b46bdeea14
order hooks by file name
...
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-27 19:38:32 +10:00
Andrew Gregory
e8e872c8f9
validate hooks after parsing
...
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18 10:59:23 +10:00
Andrew Gregory
16718a216e
run hooks during trans_commit
...
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18 10:59:23 +10:00
Andrew Gregory
568a89d580
add hook data types and parser
...
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-10-18 10:59:23 +10:00