Use dep_expand instead of key_expand in the blocker display, since it seems
authorZac Medico <zmedico@gentoo.org>
Mon, 21 Sep 2009 13:48:15 +0000 (13:48 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 21 Sep 2009 13:48:15 +0000 (13:48 -0000)
like a better fit. Also, use str(atom) since we don't want to assume that
Atoms are string type (though they happen to be now). This assumption is
what caused the traceback in bug 285637, comment #5.

svn path=/main/trunk/; revision=14320

pym/_emerge/depgraph.py

index 4954c1a3eb7742a1ad538ff01ebfe4d5ce5663a3..44bb7b45f47c8f4c06b0020b3207321a89182e8f 100644 (file)
@@ -3980,14 +3980,14 @@ class depgraph(object):
                                        counters.blocks += 1
                                        if x.satisfied:
                                                counters.blocks_satisfied += 1
-                               resolved = portage.key_expand(
+                               resolved = portage.dep_expand(
                                        str(x.atom).lstrip("!"), mydb=vardb, settings=pkgsettings)
                                if "--columns" in self._frozen_config.myopts and "--quiet" in self._frozen_config.myopts:
-                                       addl += " " + colorize(blocker_style, resolved)
+                                       addl += " " + colorize(blocker_style, str(resolved))
                                else:
                                        addl = "[%s %s] %s%s" % \
                                                (colorize(blocker_style, "blocks"),
-                                               addl, indent, colorize(blocker_style, resolved))
+                                               addl, indent, colorize(blocker_style, str(resolved)))
                                block_parents = self._dynamic_config._blocker_parents.parent_nodes(x)
                                block_parents = set([pnode[2] for pnode in block_parents])
                                block_parents = ", ".join(block_parents)