From 630047890226fa6e0e1994b931e5ce680f1cdfcc Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 17 Feb 2013 21:19:04 -0500 Subject: [PATCH] depgraph: tweak "required by" message format The current output format for listing a chain of dependencies produces one long flat line that can be hard to read. For example, if you mask dev-lang/ruby and then try to install dev-ruby/json, you'll see: The following mask changes are necessary to proceed: (see "package.unmask" in the portage(5) man page for more details) #required by dev-ruby/rdoc-3.12.1[ruby_targets_ruby19] # /etc/portage/package.mask/misc: =dev-lang/ruby-1.9.3_p385 #required by dev-ruby/rubygems-1.8.24[ruby_targets_ruby18], required by virtual/rubygems-1, required by dev-ruby/racc-1.4.9[-test,ruby_targets_ruby18], required by dev-ruby/rdoc-3.12.1[ruby_targets_ruby18], required by dev-lang/ruby-1.9.3_p385[rdoc], required by dev-ruby/rake-0.9.2.2[ruby_targets_ruby19], required by dev-ruby/json-1.7.7[-test,-doc,ruby_targets_ruby19] # /etc/portage/package.mask/misc: =dev-lang/ruby-1.8.7_p371 Tracing your way through that list is not easy. Instead, let's use newlines and now we get: The following mask changes are necessary to proceed: (see "package.unmask" in the portage(5) man page for more details) # required by dev-ruby/rdoc-3.12.1[ruby_targets_ruby19] # /etc/portage/package.mask/misc: =dev-lang/ruby-1.9.3_p385 # required by dev-ruby/rubygems-1.8.24[ruby_targets_ruby18] # required by virtual/rubygems-1 # required by dev-ruby/racc-1.4.9[-test,ruby_targets_ruby18] # required by dev-ruby/rdoc-3.12.1[ruby_targets_ruby18] # required by dev-lang/ruby-1.9.3_p385[rdoc] # required by dev-ruby/rake-0.9.2.2[ruby_targets_ruby19] # required by dev-ruby/json-1.7.7[-test,-doc,ruby_targets_ruby19] # /etc/portage/package.mask/misc: =dev-lang/ruby-1.8.7_p371 Signed-off-by: Mike Frysinger --- pym/_emerge/depgraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index bab1c32aa..6f7b673db 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -3617,7 +3617,7 @@ class depgraph(object): else: display_list.append("required by %s" % node) - msg = "#" + ", ".join(display_list) + "\n" + msg = "# " + "\n# ".join(display_list) + "\n" return msg -- 2.26.2