diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2005-04-02 20:31:40 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-04-02 20:31:40 +0000 |
commit | 3dc36aa0e15b669883e88ee418bfaa3e53a58e3f (patch) | |
tree | 8ed28791e2fc56b124d5c4158f21fb5ed6b1b95d /src | |
parent | c5418ebfbcab8d7eb719e905ac9f061500a37dac (diff) | |
download | pacman-3dc36aa0e15b669883e88ee418bfaa3e53a58e3f.tar.xz |
sync with changes in alpm.h and new RESOLVEDEPS event
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/trans.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/pacman/trans.c b/src/pacman/trans.c index 37645e91..e58151f6 100644 --- a/src/pacman/trans.c +++ b/src/pacman/trans.c @@ -32,21 +32,27 @@ #include "log.h" #include "trans.h" +#define LOG_STR_LEN 256 + /* Callback to handle transaction events */ void cb_trans(unsigned short event, void *data1, void *data2) { - char str[256] = ""; + char str[LOG_STR_LEN] = ""; switch(event) { - case PM_TRANS_EVT_DEPS_START: + case PM_TRANS_EVT_CHECKDEPS_START: MSG(NL, "checking dependencies... "); break; - case PM_TRANS_EVT_CONFLICTS_START: + case PM_TRANS_EVT_FILECONFLICTS_START: MSG(NL, "checking for file conflicts... "); break; - case PM_TRANS_EVT_DEPS_DONE: - case PM_TRANS_EVT_CONFLICTS_DONE: + case PM_TRANS_EVT_RESOLVEDEPS_START: + MSG(NL, "resolving dependencies... "); + break; + case PM_TRANS_EVT_CHECKDEPS_DONE: + case PM_TRANS_EVT_FILECONFLICTS_DONE: + case PM_TRANS_EVT_RESOLVEDEPS_DONE: MSG(CL, "done.\n"); break; case PM_TRANS_EVT_ADD_START: @@ -54,7 +60,7 @@ void cb_trans(unsigned short event, void *data1, void *data2) break; case PM_TRANS_EVT_ADD_DONE: MSG(CL, "done.\n"); - snprintf(str, 256, "installed %s (%s)", + snprintf(str, LOG_STR_LEN, "installed %s (%s)", (char *)alpm_pkg_getinfo(data1, PM_PKG_NAME), (char *)alpm_pkg_getinfo(data1, PM_PKG_VERSION)); alpm_logaction(str); @@ -64,7 +70,7 @@ void cb_trans(unsigned short event, void *data1, void *data2) break; case PM_TRANS_EVT_REMOVE_DONE: MSG(CL, "done.\n"); - snprintf(str, 256, "removed %s (%s)", + snprintf(str, LOG_STR_LEN, "removed %s (%s)", (char *)alpm_pkg_getinfo(data1, PM_PKG_NAME), (char *)alpm_pkg_getinfo(data1, PM_PKG_VERSION)); alpm_logaction(str); @@ -74,7 +80,7 @@ void cb_trans(unsigned short event, void *data1, void *data2) break; case PM_TRANS_EVT_UPGRADE_DONE: MSG(CL, "done.\n"); - snprintf(str, 256, "upgraded %s (%s -> %s)", + snprintf(str, LOG_STR_LEN, "upgraded %s (%s -> %s)", (char *)alpm_pkg_getinfo(data1, PM_PKG_NAME), (char *)alpm_pkg_getinfo(data1, PM_PKG_VERSION), (char *)alpm_pkg_getinfo(data2, PM_PKG_VERSION)); @@ -83,5 +89,4 @@ void cb_trans(unsigned short event, void *data1, void *data2) } } - /* vim: set ts=2 sw=2 noet: */ |