From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3CD3313825A for ; Sat, 14 May 2016 18:34:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 909E121C04D; Sat, 14 May 2016 18:34:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F0577224077 for ; Sat, 14 May 2016 18:34:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6038340B1E for ; Sat, 14 May 2016 18:34:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4DB78980 for ; Sat, 14 May 2016 18:33:57 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1463250580.1f4d8908748dc59c362d655db3f6fe3b4c913476.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/repoman/modules/scan/metadata/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/modules/scan/metadata/pkgmetadata.py X-VCS-Directories: pym/repoman/modules/scan/metadata/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 1f4d8908748dc59c362d655db3f6fe3b4c913476 X-VCS-Branch: repoman Date: Sat, 14 May 2016 18:33:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 430a82cf-9b0b-442a-b79d-f0f8c0830696 X-Archives-Hash: 5a09ed9b3633301c38feff4d29dd1c79 commit: 1f4d8908748dc59c362d655db3f6fe3b4c913476 Author: Brian Dolbec gentoo org> AuthorDate: Thu May 5 16:04:54 2016 +0000 Commit: Brian Dolbec gentoo 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): From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4C2BE13825A for ; Sun, 15 May 2016 23:51:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D2644142DD; Sun, 15 May 2016 23:51:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7F52E142CC for ; Sun, 15 May 2016 23:51:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CC021340C02 for ; Sun, 15 May 2016 23:51:16 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1F728972 for ; Sun, 15 May 2016 23:51:13 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1463250580.1f4d8908748dc59c362d655db3f6fe3b4c913476.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/modules/scan/metadata/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/modules/scan/metadata/pkgmetadata.py X-VCS-Directories: pym/repoman/modules/scan/metadata/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 1f4d8908748dc59c362d655db3f6fe3b4c913476 X-VCS-Branch: master Date: Sun, 15 May 2016 23:51:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0144355a-3f4c-41a0-a1d2-d144e1348935 X-Archives-Hash: 1088ec801df4f1dd0d90146ce662def7 Message-ID: <20160515235113.Wwmnj9Hd0PIy1MJdh-HtRcKIBQeaisr16K_weaB-VGQ@z> commit: 1f4d8908748dc59c362d655db3f6fe3b4c913476 Author: Brian Dolbec gentoo org> AuthorDate: Thu May 5 16:04:54 2016 +0000 Commit: Brian Dolbec gentoo 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):