summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-12-28 11:27:01 +0100
committerAurelien Foret <aurelien@archlinux.org>2005-12-28 11:27:01 +0100
commitcc1c5b163bf18b9c798b9a7771e4775ebe92f1f0 (patch)
tree36a62af0323c8a70ff294f52532028d12f6402ec
parentb062a21d2ebb2ebd21f809baf04e6f3da64f018f (diff)
downloadpacman-cc1c5b163bf18b9c798b9a7771e4775ebe92f1f0.tar.gz
pacman-cc1c5b163bf18b9c798b9a7771e4775ebe92f1f0.tar.xz
Fixed some logging issues (patch from VMiklos <vmiklos@frugalware.org>)
-rw-r--r--lib/libalpm/add.c7
-rw-r--r--lib/libalpm/remove.c1
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index e382fa14..a7432483 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -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);
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 47350bd6..e17d36f5 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -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);
}
}