summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-12-28 10:27:01 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-12-28 10:27:01 +0000
commitcc1c5b163bf18b9c798b9a7771e4775ebe92f1f0 (patch)
tree36a62af0323c8a70ff294f52532028d12f6402ec /lib/libalpm/add.c
parentb062a21d2ebb2ebd21f809baf04e6f3da64f018f (diff)
downloadpacman-cc1c5b163bf18b9c798b9a7771e4775ebe92f1f0.tar.xz
Fixed some logging issues (patch from VMiklos <vmiklos@frugalware.org>)
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c7
1 files changed, 3 insertions, 4 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);