From 24000b83c9a9ba2f25a46914d2919293dc865a2e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 7 Jun 2011 13:29:05 -0500 Subject: Require handle argument to all alpm_trans_*() methods Begin enforcing the need to pass a handle. This allows us to remove one more extern handle declaration from the backend. Signed-off-by: Dan McGee --- src/pacman/remove.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pacman/remove.c') diff --git a/src/pacman/remove.c b/src/pacman/remove.c index 46c595f9..b96687ae 100644 --- a/src/pacman/remove.c +++ b/src/pacman/remove.c @@ -99,7 +99,7 @@ int pacman_remove(alpm_list_t *targets) } /* Step 2: prepare the transaction based on its type, targets and flags */ - if(alpm_trans_prepare(&data) == -1) { + if(alpm_trans_prepare(config->handle, &data) == -1) { pm_fprintf(stderr, PM_LOG_ERROR, _("failed to prepare transaction (%s)\n"), alpm_strerrorlast()); switch(pm_errno) { @@ -129,7 +129,7 @@ int pacman_remove(alpm_list_t *targets) /* Search for holdpkg in target list */ int holdpkg = 0; - for(i = alpm_trans_get_remove(); i; i = alpm_list_next(i)) { + for(i = alpm_trans_get_remove(config->handle); i; i = alpm_list_next(i)) { pmpkg_t *pkg = alpm_list_getdata(i); if(alpm_list_find_str(config->holdpkg, alpm_pkg_get_name(pkg))) { pm_printf(PM_LOG_WARNING, _("%s is designated as a HoldPkg.\n"), @@ -143,7 +143,7 @@ int pacman_remove(alpm_list_t *targets) } /* Step 3: actually perform the removal */ - alpm_list_t *pkglist = alpm_trans_get_remove(); + alpm_list_t *pkglist = alpm_trans_get_remove(config->handle); if(pkglist == NULL) { printf(_(" there is nothing to do\n")); goto cleanup; /* we are done */ @@ -162,7 +162,7 @@ int pacman_remove(alpm_list_t *targets) goto cleanup; } - if(alpm_trans_commit(NULL) == -1) { + if(alpm_trans_commit(config->handle, NULL) == -1) { pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerrorlast()); retval = 1; -- cgit v1.2.3-24-g4f1b