diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-07 20:29:05 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-09 21:24:45 +0200 |
commit | 24000b83c9a9ba2f25a46914d2919293dc865a2e (patch) | |
tree | b3e2a30c19e52ea22a13508ba23a9eab6f9ba60b /src/pacman/sync.c | |
parent | 17a6ac567502975d3a98a34ed58d79c05eb7b8d1 (diff) | |
download | pacman-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/sync.c')
-rw-r--r-- | src/pacman/sync.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 3876d92c..6f8508ec 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -768,7 +768,7 @@ static int sync_trans(alpm_list_t *targets) } /* Step 2: "compute" the transaction based on 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) { @@ -810,7 +810,7 @@ static int sync_trans(alpm_list_t *targets) goto cleanup; } - packages = alpm_trans_get_add(); + packages = alpm_trans_get_add(config->handle); if(packages == NULL) { /* nothing to do: just exit without complaining */ printf(_(" there is nothing to do\n")); @@ -823,8 +823,8 @@ static int sync_trans(alpm_list_t *targets) goto cleanup; } - display_targets(alpm_trans_get_remove(), 0); - display_targets(alpm_trans_get_add(), 1); + display_targets(alpm_trans_get_remove(config->handle), 0); + display_targets(alpm_trans_get_add(config->handle), 1); printf("\n"); int confirm; @@ -837,7 +837,7 @@ static int sync_trans(alpm_list_t *targets) goto cleanup; } - if(alpm_trans_commit(&data) == -1) { + if(alpm_trans_commit(config->handle, &data) == -1) { pm_fprintf(stderr, PM_LOG_ERROR, _("failed to commit transaction (%s)\n"), alpm_strerrorlast()); switch(pm_errno) { |