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 <vapier@gentoo.org>
else:
display_list.append("required by %s" % node)
- msg = "#" + ", ".join(display_list) + "\n"
+ msg = "# " + "\n# ".join(display_list) + "\n"
return msg