summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/remove.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-06 16:18:59 +0200
committerDan McGee <dan@archlinux.org>2011-07-06 16:26:09 +0200
commit00628c7268e3b81045961be51a0ca640aea368b0 (patch)
tree96f4d57d6c9852e7bf1d7a2fb9676401cc859244 /lib/libalpm/remove.h
parent1d53dd716d7c7bea297a532809c4557b805a9918 (diff)
downloadpacman-00628c7268e3b81045961be51a0ca640aea368b0.tar.gz
pacman-00628c7268e3b81045961be51a0ca640aea368b0.tar.xz
Unify package removal code
This code duplication has always been a rather clumsy casuality of fixing some past upgrade issues. Unify the removal code across upgrade and remove operations into a new _alpm_remove_single_package() method wihch makes it very clear how we handle upgrade and remove differently, via several conditionals on newpkg. This commit highlights interesting behavior such as the fact that the implicit removal in every package upgrade never gets transaction events or progress callbacks. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/remove.h')
-rw-r--r--lib/libalpm/remove.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/remove.h b/lib/libalpm/remove.h
index 48dc2e9c..5da645b0 100644
--- a/lib/libalpm/remove.h
+++ b/lib/libalpm/remove.h
@@ -27,8 +27,9 @@
int _alpm_remove_prepare(alpm_handle_t *handle, alpm_list_t **data);
int _alpm_remove_packages(alpm_handle_t *handle);
-int _alpm_upgraderemove_package(alpm_handle_t *handle,
- alpm_pkg_t *oldpkg, alpm_pkg_t *newpkg);
+int _alpm_remove_single_package(alpm_handle_t *handle,
+ alpm_pkg_t *oldpkg, alpm_pkg_t *newpkg,
+ size_t targ_count, size_t pkg_count);
#endif /* _ALPM_REMOVE_H */