From 9a2b1f7742f91bb128038f467e0639441ceadb46 Mon Sep 17 00:00:00 2001 From: Alexander Berntsen Date: Fri, 20 Sep 2013 11:00:39 +0200 Subject: [PATCH] _emerge: Implement verbose-conflicts, bug #481366 --- man/emerge.1 | 4 ++++ pym/_emerge/main.py | 1 + pym/_emerge/resolver/slot_collision.py | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/man/emerge.1 b/man/emerge.1 index bbcd84bf6..c59185f24 100644 --- a/man/emerge.1 +++ b/man/emerge.1 @@ -846,6 +846,10 @@ Symbol Location Meaning {} circumfix state is bound to FEATURES settings .TE .TP +.BR "\-\-verbose\-conflicts" +Make slot conflicts more verbose. Note that this may in some cases output +hundreds of packages for slot conflicts. +.TP .BR "\-\-verbose\-main\-repo\-display" In the package merge list display, print ::repository even for main repository. .TP diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 2e68a05aa..89413a98c 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -32,6 +32,7 @@ options=[ "--debug", "--digest", "--emptytree", +"--verbose-conflicts", "--fetchonly", "--fetch-all-uri", "--ignore-default-opts", "--noconfmem", diff --git a/pym/_emerge/resolver/slot_collision.py b/pym/_emerge/resolver/slot_collision.py index a99d59645..a193baa0a 100644 --- a/pym/_emerge/resolver/slot_collision.py +++ b/pym/_emerge/resolver/slot_collision.py @@ -241,6 +241,7 @@ class slot_conflict_handler(object): Print all slot conflicts in a human readable way. """ _pkg_use_enabled = self.depgraph._pkg_use_enabled + verboseconflicts = "--verbose-conflicts" in self.myopts msg = self.conflict_msg indent = " " msg.append("\n!!! Multiple package instances within a single " + \ @@ -367,7 +368,11 @@ class slot_conflict_handler(object): best_matches[atom.cp] = (ppkg, atom) else: best_matches[atom.cp] = (ppkg, atom) - selected_for_display.update(best_matches.values()) + if verboseconflicts: + selected_for_display.add((ppkg, atom)) + if not verboseconflicts: + selected_for_display.update( + best_matches.values()) elif type == "sub-slot": for ppkg, atom, other_pkg in parents: selected_for_display.add((ppkg, atom)) -- 2.26.2