diff --git a/pisi/api.py b/pisi/api.py index 242e1a17..f633d2bf 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -182,7 +182,7 @@ def list_replaces(repo=None): @param repo: Repository of the replaced packages. If repo is None than returns a dictionary of all the replaced packages in all the repositories - {'gaim':'pidgin, 'actioncube':'assaultcube'} + {'gaim':['pidgin'], 'gimp-i18n':['gimp-i18n-tr', 'gimp-18n-de', ...]} gaim replaced by pidgin and actioncube replaced by assaultcube """ diff --git a/pisi/db/packagedb.py b/pisi/db/packagedb.py index ba5f8130..118d5423 100644 --- a/pisi/db/packagedb.py +++ b/pisi/db/packagedb.py @@ -203,7 +203,7 @@ class PackageDB(lazydb.LazyDB): replaces = self.get_package(pkg_name).replaces for r in replaces: if pisi.replace.installed_package_replaced(r): - pairs[r.package] = pkg_name + pairs.setdefault(r.package, []).append(pkg_name) return pairs diff --git a/pisi/operations/upgrade.py b/pisi/operations/upgrade.py index 2910962e..5316443c 100644 --- a/pisi/operations/upgrade.py +++ b/pisi/operations/upgrade.py @@ -114,7 +114,9 @@ def upgrade(A=[], repo=None): # Force upgrading of installed but replaced packages or else they will be removed (they are obsoleted also). # This is not wanted for a replaced driver package (eg. nvidia-X). - A |= set(replaces.values()) + # + # sum(array, []) is a nice trick to flatten an array of arrays + A |= set(sum(replaces.values(), [])) A |= upgrade_base(A)