diff options
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r-- | lib/libalpm/add.c | 7 |
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); |