commit: 6a61a12b827a0fbcdf6c111f936d8f17f6b10a33 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Thu May 5 16:04:54 2016 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Thu May 5 16:04:54 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=6a61a12b
repoman/modules/.../pkgmetadata.py: Add code to remove mostly duplicate errors Some types of errors produce two error messages cluttering up the output. The first error message is clearer, listing the possible option values allowed. This filters out the second error message for that same line and attribute. pym/repoman/modules/scan/metadata/pkgmetadata.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pym/repoman/modules/scan/metadata/pkgmetadata.py b/pym/repoman/modules/scan/metadata/pkgmetadata.py index d8344c2..433551a 100644 --- a/pym/repoman/modules/scan/metadata/pkgmetadata.py +++ b/pym/repoman/modules/scan/metadata/pkgmetadata.py @@ -221,11 +221,16 @@ class PkgMetadata(ScanBase, USEFlagChecks): return uselist def _add_validate_errors(self, xpkg, log): + listed = set() for error in log: - self.qatracker.add_error( - "metadata.bad", - "%s/metadata.xml: line: %s, %s" - % (xpkg, error.line, error.message)) + msg_prefix = error.message.split(":",1)[0] + info = "%s %s" % (error.line, msg_prefix) + if info not in listed: + listed.add(info) + self.qatracker.add_error( + "metadata.bad", + "%s/metadata.xml: line: %s, %s" + % (xpkg, error.line, error.message)) @property def runInPkgs(self):