diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-11-01 22:59:01 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-11-01 22:59:01 +0000 |
commit | c66c1f068092e21e36f5c82c2d45cba2bc581a49 (patch) | |
tree | c7d10e8028f5dea559fa68949937fbabffb61046 | |
parent | abf964a4690c987e541ed831dc33274618b69f4d (diff) | |
download | portage-c66c1f068092e21e36f5c82c2d45cba2bc581a49.tar.gz portage-c66c1f068092e21e36f5c82c2d45cba2bc581a49.tar.bz2 portage-c66c1f068092e21e36f5c82c2d45cba2bc581a49.zip |
In _validate_deps(), show the ebuild version to clarify which ebuild the
errors belong to.
svn path=/main/trunk/; revision=11789
-rw-r--r-- | pym/portage/__init__.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index bdd855791..2a0cc4075 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5863,27 +5863,31 @@ def _validate_deps(mysettings, myroot, mydo, mydbapi): dep_check_trees[myroot]["porttree"] = \ FakeTree(fakedbapi(settings=mysettings)) + msgs = [] for dep_type in dep_keys: mycheck = dep_check(metadata[dep_type], None, mysettings, myuse="all", myroot=myroot, trees=dep_check_trees) if not mycheck[0]: - writemsg("%s: %s\n%s\n" % ( - dep_type, metadata[dep_type], mycheck[1]), noiselevel=-1) - if mydo not in invalid_dep_exempt_phases: - return 1 + msgs.append(" %s: %s\n %s\n" % ( + dep_type, metadata[dep_type], mycheck[1])) for k in misc_keys: try: portage.dep.use_reduce( portage.dep.paren_reduce(metadata[k]), matchall=True) except portage.exception.InvalidDependString, e: - writemsg("%s: %s\n%s\n" % ( - k, metadata[k], str(e)), noiselevel=-1) - if mydo not in invalid_dep_exempt_phases: - return 1 + msgs.append(" %s: %s\n %s\n" % ( + k, metadata[k], str(e))) if not metadata["SLOT"]: - writemsg("SLOT is undefined\n", noiselevel=-1) + msgs.append(" SLOT is undefined\n") + + if msgs: + portage.util.writemsg_level("Error(s) in metadata for '%s':\n" % \ + (mysettings.mycpv,), level=logging.ERROR, noiselevel=-1) + for x in msgs: + portage.util.writemsg_level(x, + level=logging.ERROR, noiselevel=-1) if mydo not in invalid_dep_exempt_phases: return 1 |