1 |
commit: afefcbc188ea25540d72224034668207d9f4e024 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 5 16:01:02 2016 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 5 16:01:02 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=afefcbc1 |
7 |
|
8 |
repoman/modules/.../pkgmetadata.py: Add code to remove mostly duplicate errors |
9 |
|
10 |
Some types of errors produce two error messages cluttering up the output. |
11 |
The first error message is clearer, listing the possible option values allowed. |
12 |
This filters out the second error message for that same line and attribute. |
13 |
|
14 |
pym/repoman/modules/scan/metadata/pkgmetadata.py | 13 +++++++++---- |
15 |
1 file changed, 9 insertions(+), 4 deletions(-) |
16 |
|
17 |
diff --git a/pym/repoman/modules/scan/metadata/pkgmetadata.py b/pym/repoman/modules/scan/metadata/pkgmetadata.py |
18 |
index d8344c2..81e435e 100644 |
19 |
--- a/pym/repoman/modules/scan/metadata/pkgmetadata.py |
20 |
+++ b/pym/repoman/modules/scan/metadata/pkgmetadata.py |
21 |
@@ -221,11 +221,16 @@ class PkgMetadata(ScanBase, USEFlagChecks): |
22 |
return uselist |
23 |
|
24 |
def _add_validate_errors(self, xpkg, log): |
25 |
+ listed = set() |
26 |
for error in log: |
27 |
- self.qatracker.add_error( |
28 |
- "metadata.bad", |
29 |
- "%s/metadata.xml: line: %s, %s" |
30 |
- % (xpkg, error.line, error.message)) |
31 |
+ msg_prefix = error.message.split(":",1)[0] |
32 |
+ info = "%s %s" % (error.line, msg_prefix) |
33 |
+ if info not in listed: |
34 |
+ listed.add(info) |
35 |
+ self.qatracker.add_error( |
36 |
+ "metadata.bad", |
37 |
+ "%s/metadata.xml: line: %s, %s, %s" |
38 |
+ % (xpkg, error.line, error.type, error.message)) |
39 |
|
40 |
@property |
41 |
def runInPkgs(self): |