Make sure we generate a UPGRADE_DONE event during upgrades

This commit is contained in:
Aurelien Foret 2005-03-16 20:09:10 +00:00
parent b0f613c211
commit 7c04b050ea
1 changed files with 2 additions and 2 deletions

View File

@ -561,10 +561,10 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
_alpm_runscriptlet(handle->root, pm_install, "post_install", info->version, NULL);
}
if(pmo_upgrade && oldpkg) {
if(pmo_upgrade) {
TRANS_CB(trans, PM_TRANS_EVT_UPGRADE_DONE, info, NULL);
alpm_logaction("upgraded %s (%s -> %s)", info->name,
oldpkg->version, info->version);
oldpkg ? oldpkg->version : NULL, info->version);
} else {
TRANS_CB(trans, PM_TRANS_EVT_ADD_DONE, info, NULL);
alpm_logaction("installed %s (%s)", info->name, info->version);