summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-11-25 11:16:47 -0500
committerAllan McRae <allan@archlinux.org>2013-12-15 20:09:37 +1000
commit916c7085d829e6fec4f31b7ea3dbbdf571f9cd81 (patch)
tree3cf5d7e4cd990a65239bb625aace01dbde3f8ca2 /lib
parentb847d1d8e7a032afa51c7ccce1b253ec451bb6b7 (diff)
alpm_sync_sysupgrade: skip packages being removed
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/sync.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 551f9269..af82dc54 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -209,6 +209,11 @@ int SYMEXPORT alpm_sync_sysupgrade(alpm_handle_t *handle, int enable_downgrade)
for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = i->next) {
alpm_pkg_t *lpkg = i->data;
+ if(alpm_pkg_find(trans->remove, lpkg->name)) {
+ _alpm_log(handle, ALPM_LOG_DEBUG, "%s is marked for removal -- skipping\n", lpkg->name);
+ continue;
+ }
+
if(alpm_pkg_find(trans->add, lpkg->name)) {
_alpm_log(handle, ALPM_LOG_DEBUG, "%s is already in the target list -- skipping\n", lpkg->name);
continue;