Scheduler: handle same cpv with different SLOT
authorZac Medico <zmedico@gentoo.org>
Thu, 6 Jan 2011 04:17:03 +0000 (20:17 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 Jan 2011 04:18:30 +0000 (20:18 -0800)
pym/_emerge/Scheduler.py

index 4ba683a52ac67c39ca95487cc02426d65ccb6c90..da17eedabf6721b6f447e29bd63633c683057c43 100644 (file)
@@ -1745,6 +1745,9 @@ class Scheduler(PollScheduler):
                if pkg.operation != "uninstall":
                        vardb = pkg.root_config.trees["vartree"].dbapi
                        previous_cpv = vardb.match(pkg.slot_atom)
+                       if not previous_cpv and vardb.cpv_exists(pkg.cpv):
+                               # same cpv, different SLOT
+                               previous_cpv = [pkg.cpv]
                        if previous_cpv:
                                previous_cpv = previous_cpv.pop()
                                pkg_to_replace = self._pkg(previous_cpv,