Commit b689264d authored by Francois Perrad's avatar Francois Perrad Committed by Thomas Petazzoni
Browse files

graph-depends: refactor with more colors



Do not use the same colors for toolchain, host and target packages.

Signed-off-by: default avatarFrancois Perrad <francois.perrad@gadz.org>
[yann.morin.1998@free.fr rephrase commit log]
Signed-off-by: default avatarYann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 0686dcf7
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -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:
        if pkg.startswith('host') \
        or pkg.startswith('toolchain') \
        or pkg.startswith('rootfs'):
            color = 'gainsboro'
        else:
        print "%s [color=grey,style=filled]" % pkg_node_name(pkg)
            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):