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 22314138334 for ; Tue, 5 Jun 2018 20:49:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4E78DE098F; Tue, 5 Jun 2018 20:49:55 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 21D67E098F for ; Tue, 5 Jun 2018 20:49:54 +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 33E23335C7A for ; Tue, 5 Jun 2018 20:49:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 51C4B2AA for ; Tue, 5 Jun 2018 20:49: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: <1528231300.e8067a8e6fbdaccca5915e66c77518e82b090401.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: e8067a8e6fbdaccca5915e66c77518e82b090401 X-VCS-Branch: master Date: Tue, 5 Jun 2018 20:49: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: d23f48f5-d7bc-48f6-bf1a-19a70fc3b455 X-Archives-Hash: 339a32bdb620689f20f044b59260b044 commit: e8067a8e6fbdaccca5915e66c77518e82b090401 Author: Zac Medico gentoo org> AuthorDate: Tue Jun 5 20:41:40 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jun 5 20:41:40 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e8067a8e emerge --depclean: 'str' has no attribute 'soname' (bug 657420) Convert str to Atom, in order to avoid an AttributeError in the DbapiProvidesIndex.match method. Also, add comment explaining the reason for _unicode(atom) usage here, since it's not obvious. Bug: https://bugs.gentoo.org/657420 pym/_emerge/actions.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 70fb8d3b4..f7232341d 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -944,8 +944,23 @@ def calc_depclean(settings, trees, ldpath_mtimes, msg.append("the following required packages not being installed:") msg.append("") for atom, parent in unresolvable: + # For readability, we want to display the atom with USE + # conditionals evaluated whenever possible. However, + # there is a very special case where the atom does not + # match because the unevaluated form contains one or + # more flags for which the target package has missing + # IUSE, but due to conditionals those flags are only + # visible in the unevaluated form of the atom. In this + # case, we must display the unevaluated atom, so that + # the user can see the conditional USE deps that would + # otherwise be invisible. Use Atom(_unicode(atom)) to + # test for a package where this case would matter. This + # is not necessarily the same as atom.without_use, + # since Atom(_unicode(atom)) may still contain some + # USE dependencies that remain after evaluation of + # conditionals. if atom.package and atom != atom.unevaluated_atom and \ - vardb.match(_unicode(atom)): + vardb.match(Atom(_unicode(atom))): msg.append(" %s (%s) pulled in by:" % (atom.unevaluated_atom, atom)) else: