From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D52A8138010 for ; Sun, 7 Oct 2012 22:03:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57250E0025; Sun, 7 Oct 2012 22:02:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D3CD4E0025 for ; Sun, 7 Oct 2012 22:02:54 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 16F4633D218 for ; Sun, 7 Oct 2012 22:02:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 901A9E5436 for ; Sun, 7 Oct 2012 22:02:51 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1349647355.83577043ac769db95e490ef180de14d01072f13a.zmedico@gentoo> 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: 83577043ac769db95e490ef180de14d01072f13a X-VCS-Branch: master Date: Sun, 7 Oct 2012 22:02:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 64e481ab-7ca8-48f7-85a3-79e33335a1b0 X-Archives-Hash: 1e9e0764198465df50619f36eb5a4a3b commit: 83577043ac769db95e490ef180de14d01072f13a Author: Zac Medico gentoo org> AuthorDate: Sun Oct 7 22:02:35 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Oct 7 22:02:35 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=83577043 Show slot + repo for colliding packages. See bug #437516 for example. --- pym/portage/dbapi/vartree.py | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 11d9800..07b3cdb 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -12,7 +12,7 @@ portage.proxy.lazyimport.lazyimport(globals(), 'portage.dbapi.dep_expand:dep_expand', 'portage.dbapi._MergeProcess:MergeProcess', 'portage.dep:dep_getkey,isjustname,isvalidatom,match_from_list,' + \ - 'use_reduce,_get_slot_re', + 'use_reduce,_get_slot_re,_slot_separator,_repo_separator', 'portage.eapi:_get_eapi_attrs', 'portage.elog:collect_ebuild_messages,collect_messages,' + \ 'elog_process,_merge_logentries', @@ -3803,17 +3803,29 @@ class dblink(object): # get_owners is slow for large numbers of files, so # don't look them all up. collisions = collisions[:20] + + pkg_info_strs = {} self.lockdb() try: owners = self.vartree.dbapi._owners.get_owners(collisions) self.vartree.dbapi.flush_cache() + + for pkg in owners: + other_slot, other_repo = self.vartree.dbapi.aux_get( + pkg.mycpv, ["SLOT", "repository"]) + pkg_info_str = "%s%s%s" % (pkg.mycpv, + _slot_separator, other_slot) + if other_repo: + pkg_info_str += "%s%s" % (_repo_separator, + other_repo) + pkg_info_strs[pkg.mycpv] = pkg_info_str + finally: self.unlockdb() for pkg, owned_files in owners.items(): - cpv = pkg.mycpv msg = [] - msg.append("%s" % cpv) + msg.append(pkg_info_strs[pkg.mycpv]) for f in sorted(owned_files): msg.append("\t%s" % os.path.join(destroot, f.lstrip(os.path.sep)))