Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] graph-depends: refactor with more color
@ 2014-05-31 19:20 Francois Perrad
  2014-05-31 19:50 ` Yann E. MORIN
  2014-05-31 20:33 ` Yann E. MORIN
  0 siblings, 2 replies; 5+ messages in thread
From: Francois Perrad @ 2014-05-31 19:20 UTC (permalink / raw)
  To: buildroot

target and host packages don't use the same background color

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 support/scripts/graph-depends | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends
index e2a5e1e..443ac7d 100755
--- a/support/scripts/graph-depends
+++ b/support/scripts/graph-depends
@@ -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):
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-01 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-31 19:20 [Buildroot] [PATCH] graph-depends: refactor with more color Francois Perrad
2014-05-31 19:50 ` Yann E. MORIN
2014-05-31 20:33 ` Yann E. MORIN
2014-06-01 13:23   ` François Perrad
2014-06-01 13:49     ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox