public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] depgraph: Skip atoms that are None (bug 505944)
Date: Thu, 27 Mar 2014 09:16:08 -0700	[thread overview]
Message-ID: <20140327091608.46339c1d.dolsen@gentoo.org> (raw)
In-Reply-To: <1395922863-7944-1-git-send-email-bernalex@gentoo.org>

On Thu, 27 Mar 2014 13:21:03 +0100
Alexander Berntsen <bernalex@gentoo.org> 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 <dolsen>



  reply	other threads:[~2014-03-27 16:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-27 12:21 [gentoo-portage-dev] [PATCH] depgraph: Skip atoms that are None (bug 505944) Alexander Berntsen
2014-03-27 16:16 ` Brian Dolbec [this message]
2014-03-28  9:07   ` Alexander Berntsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140327091608.46339c1d.dolsen@gentoo.org \
    --to=dolsen@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox