summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-04-05 18:37:23 +0200
committerDan McGee <dan@archlinux.org>2007-04-05 18:37:23 +0200
commitd4f78116e0c3bc300098b13f7d8bd328edb13cd1 (patch)
tree06fccd2cff002dfc0e6cb0289326715880c9355d
parentef578e77c836c629a47d9efc63bc6580307b7126 (diff)
downloadpacman-d4f78116e0c3bc300098b13f7d8bd328edb13cd1.tar.gz
pacman-d4f78116e0c3bc300098b13f7d8bd328edb13cd1.tar.xz
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>.
-rw-r--r--lib/libalpm/remove.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 03b23d25..291eb7a0 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -284,10 +284,10 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
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 */
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) {
EVENT(trans, PM_TRANS_EVT_REMOVE_START, info, NULL);