summaryrefslogtreecommitdiffstats
path: root/src/pacman/remove.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-06-09 23:00:55 +0200
committerDan McGee <dan@archlinux.org>2011-06-14 02:32:59 +0200
commitfb3ad7f8823dd3300528b44427d40e17594b1400 (patch)
tree8932518e67553383a178d23fcdd07beb24dc801e /src/pacman/remove.c
parent01ad3faee934aa805237bf5405e7c74dc1482a17 (diff)
downloadpacman-fb3ad7f8823dd3300528b44427d40e17594b1400.tar.gz
pacman-fb3ad7f8823dd3300528b44427d40e17594b1400.tar.xz
Add handle argument to alpm_(add|remove)_pkg()
This makes these functions consistent with the rest of the transaction related API calls. We do an additional assert to ensure the handle attached to the package is the same as the handle passed in. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/remove.c')
-rw-r--r--src/pacman/remove.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index b96687ae..6da3b044 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -38,7 +38,7 @@ static int remove_target(const char *target)
alpm_list_t *p;
if((info = alpm_db_get_pkg(db_local, target)) != NULL) {
- if(alpm_remove_pkg(info) == -1) {
+ if(alpm_remove_pkg(config->handle, info) == -1) {
pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", target, alpm_strerrorlast());
return -1;
}
@@ -53,7 +53,7 @@ static int remove_target(const char *target)
}
for(p = alpm_grp_get_pkgs(grp); p; p = alpm_list_next(p)) {
pmpkg_t *pkg = alpm_list_getdata(p);
- if(alpm_remove_pkg(pkg) == -1) {
+ if(alpm_remove_pkg(config->handle, pkg) == -1) {
pm_fprintf(stderr, PM_LOG_ERROR, "'%s': %s\n", target, alpm_strerrorlast());
return -1;
}