summaryrefslogtreecommitdiffstats
path: root/src/pacman/remove.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-07 20:29:05 +0200
committerDan McGee <dan@archlinux.org>2011-06-09 21:24:45 +0200
commit24000b83c9a9ba2f25a46914d2919293dc865a2e (patch)
treeb3e2a30c19e52ea22a13508ba23a9eab6f9ba60b /src/pacman/remove.c
parent17a6ac567502975d3a98a34ed58d79c05eb7b8d1 (diff)
downloadpacman-24000b83c9a9ba2f25a46914d2919293dc865a2e.tar.gz
pacman-24000b83c9a9ba2f25a46914d2919293dc865a2e.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'src/pacman/remove.c')
-rw-r--r--src/pacman/remove.c8
1 files changed, 4 insertions, 4 deletions
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;