index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2015-10-16 20:28:25 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-10-18 10:59:23 +1000 |
commit | 16718a216ee5607c56d220a198fdb48a923aaafc (patch) | |
tree | 029cbd2d0bbae31ad48e9b412a7b18f2c414ceac /lib/libalpm/trans.c | |
parent | 568a89d58018e89e3a5bb3c28cb0ca3b845aae1b (diff) |
-rw-r--r-- | lib/libalpm/trans.c | 6 |
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index ed073c09..a6b1aef6 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -40,6 +40,7 @@ #include "sync.h" #include "alpm.h" #include "deps.h" +#include "hook.h" /** \addtogroup alpm_trans Transaction Functions * @brief Functions to manipulate libalpm transactions @@ -189,6 +190,10 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data) } } + if(_alpm_hook_run(handle, ALPM_HOOK_PRE_TRANSACTION) != 0) { + RET_ERR(handle, ALPM_ERR_TRANS_HOOK_FAILED, -1); + } + trans->state = STATE_COMMITING; alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction started\n"); @@ -215,6 +220,7 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data) alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction interrupted\n"); } else { alpm_logaction(handle, ALPM_CALLER_PREFIX, "transaction completed\n"); + _alpm_hook_run(handle, ALPM_HOOK_POST_TRANSACTION); } trans->state = STATE_COMMITED; |