From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QLMLV-0004Zj-IK for garchives@archives.gentoo.org; Sat, 14 May 2011 21:25:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 795261C093; Sat, 14 May 2011 21:25:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 48D8F1C093 for ; Sat, 14 May 2011 21:25:40 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D974E1B4052 for ; Sat, 14 May 2011 21:25:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 4CEF845B44 for ; Sat, 14 May 2011 21:25:39 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c331b8725f4ef53d7f65b624d085cd6dad5f29e9 Date: Sat, 14 May 2011 21:25:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: f69ac491367fbc39ffde653a1f087687 commit: c331b8725f4ef53d7f65b624d085cd6dad5f29e9 Author: Zac Medico gentoo org> AuthorDate: Sat May 14 21:25:16 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat May 14 21:25:16 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dc331b872 treewalk: fix plib_collisions with same cpv --- pym/portage/dbapi/vartree.py | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index cdae340..13d9ab2 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -3468,14 +3468,20 @@ class dblink(object): for cpv, paths in plib_collisions.items(): if cpv not in plib_dict: continue - if cpv =3D=3D self.mycpv: - continue - has_vdb_entry =3D True - try: - slot, counter =3D self.vartree.dbapi.aux_get( - cpv, ["SLOT", "COUNTER"]) - except KeyError: - has_vdb_entry =3D False + has_vdb_entry =3D False + if cpv !=3D self.mycpv: + # If we've replaced another instance with the + # same cpv then the vdb entry no longer belongs + # to it, so we'll have to get the slot and couter + # from plib_registry._data instead. + try: + slot, counter =3D self.vartree.dbapi.aux_get( + cpv, ["SLOT", "COUNTER"]) + has_vdb_entry =3D True + except KeyError: + pass + + if not has_vdb_entry: # It's possible for previously unmerged packages # to have preserved libs in the registry, so try # to retrieve the slot and counter from there.