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 1CE651384B4 for ; Mon, 4 Jan 2016 21:30:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3773E0888; Mon, 4 Jan 2016 21:30:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F3BF4E0867 for ; Mon, 4 Jan 2016 21:30:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 81716340754 for ; Mon, 4 Jan 2016 21:30:32 +0000 (UTC) From: Mike Frysinger To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] [PATCH] repoman: filter out duplicate dependencies in error messages Date: Mon, 4 Jan 2016 16:30:30 -0500 Message-Id: <1451943030-20380-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 2.6.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 1985e561-3987-4720-ba12-40a8664b7d4a X-Archives-Hash: cc4a4b5c0cbddf9bc3555b6cf212a470 Some packages list the same atom multiple times (e.g. behind diff USE flags). If one of them throws an error, we end up listing it more than once, and the output can get verbose/useless. --- pym/repoman/scanner.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py index d1c10d7..94ada90 100644 --- a/pym/repoman/scanner.py +++ b/pym/repoman/scanner.py @@ -704,13 +704,22 @@ class Scanner(object): # we have some unsolvable deps # remove ! deps, which always show up as unsatisfiable - atoms = [ + all_atoms = [ str(atom.unevaluated_atom) for atom in atoms if not atom.blocker] # if we emptied out our list, continue: - if not atoms: + if not all_atoms: continue + + # Filter out duplicates. We do this by hand (rather + # than use a set) so the order is stable and better + # matches the order that's in the ebuild itself. + atoms = [] + for atom in all_atoms: + if atom not in atoms: + atoms.append(atom) + if self.options.output_style in ['column']: self.qatracker.add_error(mykey, "%s: %s: %s(%s) %s" -- 2.6.2