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 18AA01387FD for ; Thu, 27 Mar 2014 16:16:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 10DAFE0B59; Thu, 27 Mar 2014 16:16:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 75B14E0B2F for ; Thu, 27 Mar 2014 16:16:28 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id A319733FD84 for ; Thu, 27 Mar 2014 16:16:27 +0000 (UTC) Date: Thu, 27 Mar 2014 09:16:08 -0700 From: Brian Dolbec To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] depgraph: Skip atoms that are None (bug 505944) Message-ID: <20140327091608.46339c1d.dolsen@gentoo.org> In-Reply-To: <1395922863-7944-1-git-send-email-bernalex@gentoo.org> References: <1395922863-7944-1-git-send-email-bernalex@gentoo.org> Organization: Gentoo Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 738c4961-2592-49da-b186-596ed03b80d8 X-Archives-Hash: 4301a5137b2144243c39c3efd17cdded On Thu, 27 Mar 2014 13:21:03 +0100 Alexander Berntsen wrote: > Don't try to display atoms that are None when in debug mode. > --- > Can I get an ACK on this please? Do share your ideas for refactoring, > if any. But even if this is not how we want it to work in the end, I > still think we should commit it to fix the bug. > > This is not nearly bad enough a bug to commit a panic fix. It is the result of a typo on the commandline only. I did some testing on my system. This bug depends on there being a resume list. During testing, I tried dropping the -p option in a root terminal, with a different change applied to prevent the traceback. It output a huge long list of debug info, did not merge anything, now it no longer has that merge list so only outputs: emerge: It seems we have nothing to resume... diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 83035c2..61ef31d 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1942,8 +1942,9 @@ class depgraph(object): # Display the specific atom from SetArg or # Package types. uneval = "" - if dep.atom is not dep.atom.unevaluated_atom: - uneval = " (%s)" % (dep.atom.unevaluated_atom,) + if dep.atom and dep.atom.unevaluated_atom: + if dep.atom is not dep.atom.unevaluated_atom: + uneval = " (%s)" % (dep.atom.unevaluated_atom,) writemsg_level( "%s%s%s required by %s\n" % ("Parent Dep:".ljust(15), dep.atom, uneval, myparent), lines 1-16/16 (END) This takes advantage of the fact that uneval is initialized to "" Then only reassigns it if there is actually a mismatch. -- Brian Dolbec