Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] [PATCH] depgraph: tweak "required by" message format
Date: Mon, 18 Feb 2013 02:20:48
Message-Id: 1361154061-22572-1-git-send-email-vapier@gentoo.org
1 The current output format for listing a chain of dependencies produces
2 one long flat line that can be hard to read. For example, if you mask
3 dev-lang/ruby and then try to install dev-ruby/json, you'll see:
4
5 The following mask changes are necessary to proceed:
6 (see "package.unmask" in the portage(5) man page for more details)
7 =dev-lang/ruby-1.9.3_p385
8 =dev-lang/ruby-1.8.7_p371
9
10 Tracing your way through that list is not easy. Instead, let's use
11 newlines and now we get:
12
13 The following mask changes are necessary to proceed:
14 (see "package.unmask" in the portage(5) man page for more details)
15 =dev-lang/ruby-1.9.3_p385
16 =dev-lang/ruby-1.8.7_p371
17
18 Signed-off-by: Mike Frysinger <vapier@g.o>
19 ---
20 pym/_emerge/depgraph.py | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
24 index bab1c32..6f7b673 100644
25 --- a/pym/_emerge/depgraph.py
26 +++ b/pym/_emerge/depgraph.py
27 @@ -3617,7 +3617,7 @@ class depgraph(object):
28 else:
29 display_list.append("required by %s" % node)
30
31 - msg = "#" + ", ".join(display_list) + "\n"
32 + msg = "# " + "\n# ".join(display_list) + "\n"
33 return msg
34
35
36 --
37 1.8.1.2

Replies