public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/metadata/
Date: Sat, 14 May 2016 18:33:57 +0000 (UTC)	[thread overview]
Message-ID: <1463250580.1f4d8908748dc59c362d655db3f6fe3b4c913476.dolsen@gentoo> (raw)

commit:     1f4d8908748dc59c362d655db3f6fe3b4c913476
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: Sat May 14 18:29:40 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1f4d8908

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):


WARNING: multiple messages have this Message-ID (diff)
From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/modules/scan/metadata/
Date: Sun, 15 May 2016 23:51:13 +0000 (UTC)	[thread overview]
Message-ID: <1463250580.1f4d8908748dc59c362d655db3f6fe3b4c913476.dolsen@gentoo> (raw)
Message-ID: <20160515235113.Wwmnj9Hd0PIy1MJdh-HtRcKIBQeaisr16K_weaB-VGQ@z> (raw)

commit:     1f4d8908748dc59c362d655db3f6fe3b4c913476
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: Sat May 14 18:29:40 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1f4d8908

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):


             reply	other threads:[~2016-05-14 18:34 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-14 18:33 Brian Dolbec [this message]
2016-05-15 23:51 ` [gentoo-commits] proj/portage:master commit in: pym/repoman/modules/scan/metadata/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2016-05-14 18:33 [gentoo-commits] proj/portage:repoman " Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-14 18:33 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-08 21:21 Brian Dolbec
2016-05-05 16:06 Brian Dolbec
2016-05-05 16:02 Brian Dolbec
2016-05-04  6:24 Brian Dolbec
2016-05-04  6:09 Brian Dolbec
2016-05-04  3:45 Brian Dolbec
2016-05-03 20:58 Brian Dolbec
2016-05-03 20:58 Brian Dolbec
2016-05-03 17:43 Brian Dolbec
2016-05-03 17:43 Brian Dolbec
2016-05-03  9:33 Brian Dolbec
2016-05-03  9:33 Brian Dolbec
2016-05-03  9:33 Brian Dolbec
2016-05-03  9:33 Brian Dolbec
2016-05-03  9:33 Brian Dolbec
2016-04-25 15:32 Brian Dolbec
2016-04-21 16:54 Brian Dolbec
2016-03-15 19:00 Brian Dolbec
2016-01-06  4:21 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463250580.1f4d8908748dc59c362d655db3f6fe3b4c913476.dolsen@gentoo \
    --to=dolsen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox