_emerge: Implement verbose-conflicts, bug #481366
authorAlexander Berntsen <alexander@plaimi.net>
Fri, 20 Sep 2013 09:00:39 +0000 (11:00 +0200)
committerZac Medico <zmedico@gentoo.org>
Mon, 23 Sep 2013 19:56:37 +0000 (12:56 -0700)
man/emerge.1
pym/_emerge/main.py
pym/_emerge/resolver/slot_collision.py

index bbcd84bf6ef9606abd1bb7dc640741f9235e78b8..c59185f249e099b923ffb0e01343fc022aef4c25 100644 (file)
@@ -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
index 2e68a05aab9860743618b8012fa7dbb69aad2bd2..89413a98c3a25da2b30b5f2f0485ad2e52d7ba85 100644 (file)
@@ -32,6 +32,7 @@ options=[
 "--debug",
 "--digest",
 "--emptytree",
+"--verbose-conflicts",
 "--fetchonly",    "--fetch-all-uri",
 "--ignore-default-opts",
 "--noconfmem",
index a99d59645ba7c7f3b89a4867183de0df6a0da568..a193baa0a59edffd9d4a20e73dc7334849165ae5 100644 (file)
@@ -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))