From 73139ccb3c47ed1ebb1a62a27deb080b66d92bf4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 28 Sep 2011 03:45:46 -0500 Subject: Refactor _alpm_runscriptlet() Add an is_archive parameter to reduce the amount of black magic going on. Rework to use fewer PATH_MAX sized local variables, and simplify some of the logic where appropriate in both this function and in the callers where duplicate calls can be replaced by some conditional parameter code. Signed-off-by: Dan McGee --- lib/libalpm/remove.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/remove.c') diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c index a3aa4a53..7f917faa 100644 --- a/lib/libalpm/remove.c +++ b/lib/libalpm/remove.c @@ -376,7 +376,7 @@ int _alpm_remove_single_package(alpm_handle_t *handle, /* run the pre-remove scriptlet if it exists */ if(alpm_pkg_has_scriptlet(oldpkg) && !(handle->trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) { - _alpm_runscriptlet(handle, scriptlet, "pre_remove", pkgver, NULL); + _alpm_runscriptlet(handle, scriptlet, "pre_remove", pkgver, NULL, 0); } } @@ -453,7 +453,7 @@ int _alpm_remove_single_package(alpm_handle_t *handle, /* run the post-remove script if it exists */ if(alpm_pkg_has_scriptlet(oldpkg) && !(handle->trans->flags & ALPM_TRANS_FLAG_NOSCRIPTLET)) { - _alpm_runscriptlet(handle, scriptlet, "post_remove", pkgver, NULL); + _alpm_runscriptlet(handle, scriptlet, "post_remove", pkgver, NULL, 0); } } -- cgit v1.2.3-24-g4f1b