[pacman-dev] [PATCH] alpm_sync_sysupgrade: skip packages being removed
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> --- pacman can't run into this (yet), but other front-ends might. lib/libalpm/sync.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 551f926..af82dc5 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; -- 1.8.4.2
On 26/11/13 02:16, Andrew Gregory wrote:
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> ---
pacman can't run into this (yet), but other front-ends might.
Ack.
participants (2)
-
Allan McRae
-
Andrew Gregory