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 6B02F138222 for ; Thu, 5 May 2016 16:02:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A24A21C01D; Thu, 5 May 2016 16:02:31 +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 DDFC821C01D for ; Thu, 5 May 2016 16:02:30 +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 A29D633BF54 for ; Thu, 5 May 2016 16:02:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6935B339 for ; Thu, 5 May 2016 16:02:24 +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: <1462464062.afefcbc188ea25540d72224034668207d9f4e024.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: afefcbc188ea25540d72224034668207d9f4e024 X-VCS-Branch: repoman Date: Thu, 5 May 2016 16:02:24 +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: a129b5dd-3b1e-449f-a792-5b4cb281f1c2 X-Archives-Hash: ddb11b472ecbecf64c6fb1b04f7e77aa commit: afefcbc188ea25540d72224034668207d9f4e024 Author: Brian Dolbec gentoo org> AuthorDate: Thu May 5 16:01:02 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Thu May 5 16:01:02 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=afefcbc1 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..81e435e 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, %s" + % (xpkg, error.line, error.type, error.message)) @property def runInPkgs(self):