diff options
author | Dan McGee <dan@archlinux.org> | 2007-11-08 23:41:05 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-11-08 23:41:05 -0600 |
commit | 7d51882dd0afdb87fe986a7d7c672cc0be93795b (patch) | |
tree | e7660767573f1fbee4d05805a772856db62e544b /src | |
parent | 4e45e1187d01e34e0869ad206780a67f27a41200 (diff) | |
download | pacman-7d51882dd0afdb87fe986a7d7c672cc0be93795b.tar.xz |
Simplify callback DONE event handling
Move them all to a single fallthrough case statement since they all print
"done".
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/callback.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 5160b3b3..e935c870 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -177,12 +177,8 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) printf(_("done.\n")); } break; - case PM_TRANS_EVT_CHECKDEPS_DONE: - case PM_TRANS_EVT_RESOLVEDEPS_DONE: - case PM_TRANS_EVT_INTERCONFLICTS_DONE: - printf(_("done.\n")); - break; case PM_TRANS_EVT_EXTRACT_DONE: + /* nothing */ break; case PM_TRANS_EVT_ADD_START: if(config->noprogressbar) { @@ -230,15 +226,9 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) case PM_TRANS_EVT_INTEGRITY_START: printf(_("checking package integrity... ")); break; - case PM_TRANS_EVT_INTEGRITY_DONE: - printf(_("done.\n")); - break; case PM_TRANS_EVT_DELTA_INTEGRITY_START: printf(_("checking delta integrity... ")); break; - case PM_TRANS_EVT_DELTA_INTEGRITY_DONE: - printf(_("done.\n")); - break; case PM_TRANS_EVT_DELTA_PATCHES_START: printf(_("applying deltas...\n")); break; @@ -248,9 +238,6 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) case PM_TRANS_EVT_DELTA_PATCH_START: printf(_("generating %s with %s... "), (char *)data1, (char *)data2); break; - case PM_TRANS_EVT_DELTA_PATCH_DONE: - printf(_("done.\n")); - break; case PM_TRANS_EVT_DELTA_PATCH_FAILED: printf(_("failed.\n")); break; @@ -262,9 +249,18 @@ void cb_trans_evt(pmtransevt_t event, void *data1, void *data2) break; case PM_TRANS_EVT_RETRIEVE_START: printf(_(":: Retrieving packages from %s...\n"), (char*)data1); - fflush(stdout); + break; + /* all the simple done events, with fallthrough for each */ + case PM_TRANS_EVT_CHECKDEPS_DONE: + case PM_TRANS_EVT_RESOLVEDEPS_DONE: + case PM_TRANS_EVT_INTERCONFLICTS_DONE: + case PM_TRANS_EVT_INTEGRITY_DONE: + case PM_TRANS_EVT_DELTA_INTEGRITY_DONE: + case PM_TRANS_EVT_DELTA_PATCH_DONE: + printf(_("done.\n")); break; } + fflush(stdout); } /* callback to handle questions from libalpm transactions (yes/no) */ |