From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 04C281396D0 for ; Mon, 25 Sep 2017 02:57:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A7222BC06B; Mon, 25 Sep 2017 02:57:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0B7812BC06B for ; Mon, 25 Sep 2017 02:57:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 98562340806 for ; Mon, 25 Sep 2017 02:57:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 015A483F7 for ; Mon, 25 Sep 2017 02:57:22 +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: <1506308115.164038260338d48b12432e166aa34dbd028a167d.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/search.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 164038260338d48b12432e166aa34dbd028a167d X-VCS-Branch: master Date: Mon, 25 Sep 2017 02:57:22 +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: 5c7daf79-bcd2-466a-b4ef-7648035d4bf2 X-Archives-Hash: b69b0f68c7037d8265db1ecce54df2c0 commit: 164038260338d48b12432e166aa34dbd028a167d Author: Zac Medico gentoo org> AuthorDate: Mon Sep 25 02:25:20 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Sep 25 02:55:15 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=16403826 search: only pass Atom instance to dbapi match methods This fixes errors like the following: File "_emerge/depgraph.py", line 3972, in _select_files self._frozen_config.spinner, self._frozen_config.myopts) File "_emerge/depgraph.py", line 9474, in ambiguous_package_name s.output() File "_emerge/search.py", line 469, in output self.getInstallationStatus(mycat+'/'+mypkg)) File "_emerge/search.py", line 494, in getInstallationStatus installed_package = self._vardb.match(package) File "_emerge/FakeVartree.py", line 111, in _match_wrapper matches = self._match(cpv, use_cache=use_cache) File "_emerge/resolver/DbapiProvidesIndex.py", line 39, in match if atom.soname: AttributeError: 'str' object has no attribute 'soname' pym/_emerge/search.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/search.py b/pym/_emerge/search.py index dc91ad315..36897fb15 100644 --- a/pym/_emerge/search.py +++ b/pym/_emerge/search.py @@ -162,7 +162,10 @@ class search(object): multiple package databases. If necessary, old-style virtuals can be performed on atoms prior to calling this method. """ - cp = portage.dep_getkey(atom) + if not isinstance(atom, portage.dep.Atom): + atom = portage.dep.Atom(atom) + + cp = atom.cp if level == "match-all": matches = set() for db in self._dbs: @@ -489,6 +492,9 @@ class search(object): # private interface # def getInstallationStatus(self,package): + if not isinstance(package, portage.dep.Atom): + package = portage.dep.Atom(package) + installed_package = self._vardb.match(package) if installed_package: try: