mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
sync with changes in alpm.h and new RESOLVEDEPS event
This commit is contained in:
parent
c5418ebfbc
commit
3dc36aa0e1
@ -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: */
|
||||
|
Loading…
Reference in New Issue
Block a user