Fixed some logging issues (patch from VMiklos <vmiklos@frugalware.org>)

This commit is contained in:
Aurelien Foret 2005-12-28 10:27:01 +00:00
parent b062a21d2e
commit cc1c5b163b
2 changed files with 3 additions and 5 deletions

View File

@ -327,6 +327,8 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
/* we'll need to save some record for backup checks later */
oldpkg = pkg_new();
if(oldpkg) {
strncpy(oldpkg->name, local->name, PKG_NAME_LEN);
strncpy(oldpkg->version, local->version, PKG_VERSION_LEN);
if(!(local->infolevel & INFRQ_FILES)) {
char name[PKG_FULLNAME_LEN];
snprintf(name, PKG_FULLNAME_LEN, "%s-%s", local->name, local->version);
@ -691,12 +693,9 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
}
if(pmo_upgrade) {
EVENT(trans, PM_TRANS_EVT_UPGRADE_DONE, info, NULL);
alpm_logaction("upgraded %s (%s -> %s)", info->name,
oldpkg ? oldpkg->version : NULL, info->version);
EVENT(trans, PM_TRANS_EVT_UPGRADE_DONE, oldpkg, info);
} else {
EVENT(trans, PM_TRANS_EVT_ADD_DONE, info, NULL);
alpm_logaction("installed %s (%s)", info->name, info->version);
}
FREEPKG(oldpkg);

View File

@ -293,7 +293,6 @@ int remove_commit(pmtrans_t *trans, pmdb_t *db)
if(trans->type != PM_TRANS_TYPE_UPGRADE) {
EVENT(trans, PM_TRANS_EVT_REMOVE_DONE, info, NULL);
alpm_logaction("removed %s (%s)", info->name, info->version);
}
}