Fix running of pre_remove and Post_remove

pkgname was undefined previously when this was called, fixed.
Patch from Roman Kyrylych <roman.kyrylych@gmail.com>.
This commit is contained in:
Dan McGee 2007-04-05 16:37:23 +00:00
parent ef578e77c8
commit d4f78116e0

View file

@ -284,10 +284,10 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
break; break;
} }
snprintf(scriptlet, PATH_MAX, "%s%s-%s/install", db->path,
pkgname, alpm_pkg_get_version(info));
/* get the name now so we can use it after package is removed */ /* get the name now so we can use it after package is removed */
pkgname = alpm_pkg_get_name(info); pkgname = alpm_pkg_get_name(info);
snprintf(scriptlet, PATH_MAX, "%s%s-%s/install", db->path,
pkgname, alpm_pkg_get_version(info));
if(trans->type != PM_TRANS_TYPE_UPGRADE) { if(trans->type != PM_TRANS_TYPE_UPGRADE) {
EVENT(trans, PM_TRANS_EVT_REMOVE_START, info, NULL); EVENT(trans, PM_TRANS_EVT_REMOVE_START, info, NULL);