Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOlivier Brunel <jjk@jjacky.com>2015-12-06 18:35:37 +0100
committerAllan McRae <allan@archlinux.org>2015-12-15 15:09:28 +1000
commit132ec4c3b9f761fb76ff9cf567f3723db62d72df (patch)
tree0738399fbebaf4c7456446fa21110b91c53a9c6a /src
parent3802cab56374b50d4775d9deaf229cdef5cdbe53 (diff)
Add events ALPM_EVENT_HOOK_{START,DONE}
Add events to let frontends know when hooks are being processed (and when it's done), as that might be useful to update the UI. Signed-off-by: Olivier Brunel <jjk@jjacky.com>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/callback.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c
index 7a21b22c..b8ded3d0 100644
--- a/src/pacman/callback.c
+++ b/src/pacman/callback.c
@@ -167,6 +167,13 @@ void cb_event(alpm_event_t *event)
return;
}
switch(event->type) {
+ case ALPM_EVENT_HOOK_START:
+ if(event->hook.when == ALPM_HOOK_PRE_TRANSACTION) {
+ colon_printf(_("Running pre-transaction hooks...\n"));
+ } else {
+ colon_printf(_("Running post-transaction hooks...\n"));
+ }
+ break;
case ALPM_EVENT_CHECKDEPS_START:
printf(_("checking dependencies...\n"));
break;
@@ -329,6 +336,7 @@ void cb_event(alpm_event_t *event)
case ALPM_EVENT_DISKSPACE_DONE:
case ALPM_EVENT_RETRIEVE_DONE:
case ALPM_EVENT_RETRIEVE_FAILED:
+ case ALPM_EVENT_HOOK_DONE:
/* we can safely ignore those as well */
case ALPM_EVENT_PKGDOWNLOAD_START:
case ALPM_EVENT_PKGDOWNLOAD_DONE: