summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorOlivier Brunel <i.am.jack.mail@gmail.com>2013-03-03 22:46:19 +0100
committerAllan McRae <allan@archlinux.org>2013-03-07 06:38:47 +0100
commit1b39653e9624db98c2e707a1991bc32bb26f2b67 (patch)
tree801ba006ea74ba92ab16dcc6994f9861eed1b651 /lib/libalpm
parenta98bb96b434d788d1599e622c33dce851113fabd (diff)
downloadpacman-1b39653e9624db98c2e707a1991bc32bb26f2b67.tar.gz
pacman-1b39653e9624db98c2e707a1991bc32bb26f2b67.tar.xz
libalpm: Fix installing update of a replaced package
During a sysupgrade, if a package is replaced by another, and an update for the former package is found (on another repo) the replaced package would be re-installed. Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/sync.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 204456d6..2a56115b 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -396,6 +396,8 @@ int _alpm_sync_prepare(alpm_handle_t *handle, alpm_list_t **data)
alpm_pkg_t *spkg = i->data;
for(j = spkg->removes; j; j = j->next) {
remove = alpm_list_add(remove, j->data);
+ /* do not re-install a (replaced) package even if an update is available */
+ trans->add = alpm_list_remove(trans->add, j->data, _alpm_pkg_cmp, NULL);
}
}