From 868d86ce3d70f59feb3ea4445839ae15b1863aef Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 28 Apr 2008 02:03:08 +0000 Subject: [PATCH] Fix PackageVirtualDbapi.cpv_inject() to make sure packages with duplicate cpv or slot are handled correctly. svn path=/main/trunk/; revision=10014 --- pym/_emerge/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 06060b0fd..947634354 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1583,11 +1583,17 @@ class PackageVirtualDbapi(portage.dbapi): if cp_list is None: cp_list = [] self._cp_map[pkg.cp] = cp_list + e_pkg = self._cpv_map.get(pkg.cpv) + if e_pkg is not None: + if e_pkg == pkg: + return + self.cpv_remove(e_pkg) for e_pkg in cp_list: if e_pkg.slot_atom == pkg.slot_atom: if e_pkg == pkg: return self.cpv_remove(e_pkg) + break cp_list.append(pkg) self._cpv_map[pkg.cpv] = pkg self._clear_cache() -- 2.26.2