From: Zac Medico Date: Mon, 28 Apr 2008 02:03:48 +0000 (-0000) Subject: Fix PackageVirtualDbapi.cpv_inject() to make sure packages with duplicate X-Git-Tag: v2.1.5~128 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1f348f0f2ae6d6b3cd39bf4faf2821c4c79f8175;p=portage.git Fix PackageVirtualDbapi.cpv_inject() to make sure packages with duplicate cpv or slot are handled correctly. (trunk r10014) svn path=/main/branches/2.1.2/; revision=10015 --- diff --git a/bin/emerge b/bin/emerge index 21d63ebe3..dc7f88742 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1722,11 +1722,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()