[pacman-dev] [PATCH v2] alpm: Abort ASAP on failure in pre-transaction hooks

Andrew Gregory andrew.gregory.8 at gmail.com
Tue Dec 15 08:41:37 UTC 2015


On 12/15/15 at 09:14am, Olivier Brunel wrote:
> There is no need to run any/remaining pre-transaction hooks as soon as a failure
> has occured, which will lead to aborting the transaction.
> 
> So if an error occured during the first phase (reading directories/parsing
> files), or as soon as a hook flagged abort_on_fail does fail, we stop processing
> them and return.
> 
> (For post-transaction hooks, all hooks are run regardless since there's no
> aborting.)
> 
> v2: Don't stop during first phase, so e.g. all parsing errors can be found &
> reported at once.
> 
> Signed-off-by: Olivier Brunel <jjk at jjacky.com>
> ---
>  lib/libalpm/hook.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Ack.  The v2 note just needs to be removed from the commit message
when this gets merged.


More information about the pacman-dev mailing list