graph-depends: refactor with more color
PATCH 1/1 graph-depends: refactor with more color
target and host packages don't use the same background color
--- support/scripts/graph-depends | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
support/scripts/graph-depends +14 -7
@@ -222,15 +222,22 @@ for dep in dependencies: # Print the attributes of a node: label and fill-color def print_attrs(pkg): + name = pkg_node_name(pkg) if pkg == 'all': - print "all [label = \"ALL\"]" - print "all [color=lightblue,style=filled]" - return - print "%s [label = \"%s\"]" % (pkg_node_name(pkg), pkg) - if mode == PKG_MODE and pkg == rootpkg: - print "%s [color=lightblue,style=filled]" % pkg_node_name(rootpkg) + label = 'ALL' + else: + label = pkg + if pkg == 'all' or (mode == PKG_MODE and pkg == rootpkg): + color = 'lightblue' else: - print "%s [color=grey,style=filled]" % pkg_node_name(pkg) + if pkg.startswith('host') \ + or pkg.startswith('toolchain') \ + or pkg.startswith('rootfs'): + color = 'gainsboro' + else: + color = 'grey' + print "%s [label = \"%s\"]" % (name, label) + print "%s [color=%s,style=filled]" % (name, color) # Print the dependency graph of a package def print_pkg_deps(depth, pkg):
Signature · 1 line
1.9.1
PATCH 1/1 graph-depends: refactor with more color
Fran?ois, All,
On 2014-05-31 21:20 +0200, Francois Perrad spake thusly:
Quoted 1 line
target and host packages don't use the same background color
Interesting.
Since, I also have a series touching the graphs, I'll take your patch in my series to do the appropriate transformations/adaptations.
Thanks!
Regards,
Yann E. MORIN.
Quoted 46 lines
Signed-off-by Francois Perrad <[email protected]>--- support/scripts/graph-depends | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)support/scripts/graph-depends +14
-7@@ -222,15 +222,22 @@ for dep in dependencies: # Print the attributes of a node: label and fill-color def print_attrs(pkg): + name = pkg_node_name(pkg) if pkg == 'all': - print "all [label = \"ALL\"]" - print "all [color=lightblue,style=filled]" - return - print "%s [label = \"%s\"]" % (pkg_node_name(pkg), pkg) - if mode == PKG_MODE and pkg == rootpkg: - print "%s [color=lightblue,style=filled]" % pkg_node_name(rootpkg) + label = 'ALL' + else: + label = pkg + if pkg == 'all' or (mode == PKG_MODE and pkg == rootpkg): + color = 'lightblue' else: - print "%s [color=grey,style=filled]" % pkg_node_name(pkg) + if pkg.startswith('host') \ + or pkg.startswith('toolchain') \ + or pkg.startswith('rootfs'): + color = 'gainsboro' + else: + color = 'grey' + print "%s [label = \"%s\"]" % (name, label) + print "%s [color=%s,style=filled]" % (name, color) # Print the dependency graph of a package def print_pkg_deps(depth, pkg):Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 graph-depends: refactor with more color
In reply to Francois PerradFarn?ois, All,
On 2014-05-31 21:20 +0200, Francois Perrad spake thusly:
support/scripts/graph-depends for dep in dependencies: · line 238
Quoted 4 lines
target and host packages don't use the same background color
support/scripts/graph-depends +3
-0+ color = 'gainsboro' + else: + color = 'grey'
The difference between 'gainsboro' and 'grey' is very light. At first, I thought I had forgotten to apply your patch, so the difference is light.
Did you choose it on-purpose? Did you choose it because it really looks different when printed?
I'd like we get colours that are visually different, both on-display and printed. I'll try to find a better default that is more visually different, and add a new option to specify alternate colours.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 graph-depends: refactor with more color
2014-05-31 22:33 GMT+02:00 Yann E. MORIN <[email protected]>:
Quoted 8 lines
Farn?ois, All,
On 2014-05-31 21:20 +0200, Francois Perrad spake thusly:
support/scripts/graph-depends for dep in dependencies: · line 238
Quoted 4 lines
target and host packages don't use the same background color
support/scripts/graph-depends +3
-0+ color = 'gainsboro' + else: + color = 'grey'
Quoted 5 lines
The difference between 'gainsboro' and 'grey' is very light. At first, I thought I had forgotten to apply your patch, so the difference is light.
Did you choose it on-purpose? Did you choose it because it really looks different when printed?
I don't like flashy color.
Feel free to experiment another set of color (don't forget black&white printing).
See http://graphviz.org/content/color-names
Fran?ois
Quoted 19 lines
I'd like we get colours that are visually different, both on-display and printed. I'll try to find a better default that is more visually different, and add a new option to specify alternate colours.
Regards,
Yann E. MORIN.--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 graph-depends: refactor with more color
Fran?ois, All,
On 2014-06-01 15:23 +0200, Fran?ois Perrad spake thusly:
Quoted 12 lines
2014-05-31 22:33 GMT+02:00 Yann E. MORIN <[email protected]>:
Quoted 11 lines
Farn?ois, All,
On 2014-05-31 21:20 +0200, Francois Perrad spake thusly:
support/scripts/graph-depends for dep in dependencies: · line 238
Quoted 4 lines
target and host packages don't use the same background color
support/scripts/graph-depends +3
-0+ color = 'gainsboro' + else: + color = 'grey'The difference between 'gainsboro' and 'grey' is very light. At first, I thought I had forgotten to apply your patch, so the difference is light.
Quoted 7 lines
Quoted 2 lines
Did you choose it on-purpose? Did you choose it because it really looks different when printed?
I don't like flashy color.
Feel free to experiment another set of color (don't forget black&white printing).
See http://graphviz.org/content/color-names
OK, thanks! I kept your patch as-is, and added an option to change the colours:
https://www.gitorious.org/buildroot/buildroot/commit/2092984509902a1f12e30c69f413acf0f55ec0ac
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'