public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] repoman: filter out duplicate dependencies in error messages
@ 2016-01-04 21:30 Mike Frysinger
  2016-01-05  3:17 ` Brian Dolbec
  2016-01-05  5:36 ` Zac Medico
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Frysinger @ 2016-01-04 21:30 UTC (permalink / raw
  To: gentoo-portage-dev

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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-15 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-04 21:30 [gentoo-portage-dev] [PATCH] repoman: filter out duplicate dependencies in error messages Mike Frysinger
2016-01-05  3:17 ` Brian Dolbec
2016-01-05  9:43   ` Brian Dolbec
2016-01-15 18:22   ` Mike Frysinger
2016-01-05  5:36 ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox