From 7fc635fee071e18d0422a4773937e66960be96b2 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 3 Jun 2011 12:33:18 -0500 Subject: Remove global handle from util.c Signed-off-by: Dan McGee --- lib/libalpm/add.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 13d3fc4a..a95f4bcd 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -501,8 +501,8 @@ static int commit_single_pkg(pmpkg_t *newpkg, size_t pkg_current, /* pre_upgrade scriptlet */ if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) { - _alpm_runscriptlet(handle->root, newpkg->origin_data.file, - "pre_upgrade", newpkg->version, oldpkg->version, trans); + _alpm_runscriptlet(handle, newpkg->origin_data.file, + "pre_upgrade", newpkg->version, oldpkg->version); } } else { is_upgrade = 0; @@ -513,8 +513,8 @@ static int commit_single_pkg(pmpkg_t *newpkg, size_t pkg_current, /* pre_install scriptlet */ if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) { - _alpm_runscriptlet(handle->root, newpkg->origin_data.file, - "pre_install", newpkg->version, NULL, trans); + _alpm_runscriptlet(handle, newpkg->origin_data.file, + "pre_install", newpkg->version, NULL); } } @@ -681,12 +681,12 @@ static int commit_single_pkg(pmpkg_t *newpkg, size_t pkg_current, if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) { if(is_upgrade) { - _alpm_runscriptlet(handle->root, scriptlet, "post_upgrade", + _alpm_runscriptlet(handle, scriptlet, "post_upgrade", alpm_pkg_get_version(newpkg), - oldpkg ? alpm_pkg_get_version(oldpkg) : NULL, trans); + oldpkg ? alpm_pkg_get_version(oldpkg) : NULL); } else { - _alpm_runscriptlet(handle->root, scriptlet, "post_install", - alpm_pkg_get_version(newpkg), NULL, trans); + _alpm_runscriptlet(handle, scriptlet, "post_install", + alpm_pkg_get_version(newpkg), NULL); } } @@ -738,7 +738,7 @@ int _alpm_upgrade_packages(pmtrans_t *trans, pmdb_t *db) if(!skip_ldconfig) { /* run ldconfig if it exists */ - _alpm_ldconfig(handle->root); + _alpm_ldconfig(handle); } return ret; -- cgit v1.2.3-54-g00ecf