summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-28 13:21:25 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-28 13:21:25 -0700
commit27865196cb63f1b70e1368fdb7bc3893dd44dc8d (patch)
tree9838ea756baa6cd445716fa122d74f1c6b8603b8
parent5a16f59d0bda1d40c017898e4e488b59a5e770be (diff)
downloadportage-27865196cb63f1b70e1368fdb7bc3893dd44dc8d.tar.gz
portage-27865196cb63f1b70e1368fdb7bc3893dd44dc8d.tar.bz2
portage-27865196cb63f1b70e1368fdb7bc3893dd44dc8d.zip
In depgraph._show_unsatisfied_dep(), show some debug info if
Atom.violated_conditionals() raises InvalidAtom.
-rw-r--r--pym/_emerge/depgraph.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index ca918e789..eb0dfb8a2 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -18,6 +18,7 @@ from portage.dbapi import dbapi
from portage.dbapi.dep_expand import dep_expand
from portage.dep import Atom, extract_affecting_use, check_required_use, human_readable_required_use
from portage.eapi import eapi_has_strong_blocks, eapi_has_required_use
+from portage.exception import InvalidAtom
from portage.output import bold, blue, colorize, create_color_func, darkblue, \
darkgreen, green, nc_len, red, teal, turquoise, yellow
bad = create_color_func("BAD")
@@ -2091,11 +2092,17 @@ class depgraph(object):
if mreasons:
masked_pkg_instances.add(pkg)
if atom.unevaluated_atom.use:
- if not pkg.iuse.is_valid_flag(atom.unevaluated_atom.use.required) \
- or atom.violated_conditionals(self._pkg_use_enabled(pkg), pkg.iuse.is_valid_flag).use:
- missing_use.append(pkg)
- if not mreasons:
- continue
+ try:
+ if not pkg.iuse.is_valid_flag(atom.unevaluated_atom.use.required) \
+ or atom.violated_conditionals(self._pkg_use_enabled(pkg), pkg.iuse.is_valid_flag).use:
+ missing_use.append(pkg)
+ if not mreasons:
+ continue
+ except InvalidAtom:
+ writemsg("violated_conditionals raised " + \
+ "InvalidAtom: '%s' parent: %s" % \
+ (atom, myparent), noiselevel=-1)
+ raise
if pkg.built and not mreasons:
mreasons = ["use flag configuration mismatch"]
masked_packages.append(