• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/support/scripts/graph-depends
Yegor YefremovYegor Yefremov committed 3b627c89dc821 Mar 2017
Raw file
Source viewDiff to previous
                outfile.write("%s -> %s [dir=%s]\n" % (pkg_node_name(pkg), pkg_node_name(d), arrow_dir))
 
1
#!/usr/bin/python
2
​
3
# Usage (the graphviz package must be installed in your distribution)
4
#  ./support/scripts/graph-depends [-p package-name] > test.dot
5
#  dot -Tpdf test.dot -o test.pdf
6
#
7
# With no arguments, graph-depends will draw a complete graph of
8
# dependencies for the current configuration.
9
# If '-p <package-name>' is specified, graph-depends will draw a graph
10
# of dependencies for the given package name.
11
# If '-d <depth>' is specified, graph-depends will limit the depth of
12
# the dependency graph to 'depth' levels.
13
#
14
# Limitations
15
#
16
#  * Some packages have dependencies that depend on the Buildroot
17
#    configuration. For example, many packages have a dependency on
18
#    openssl if openssl has been enabled. This tool will graph the
19
#    dependencies as they are with the current Buildroot
20
#    configuration.
21
#
22
# Copyright (C) 2010-2013 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
23
​
24
import sys
25
import subprocess
26
import argparse
27
from fnmatch import fnmatch
28
​
29
import brpkgutil
30
​
31
# Modes of operation:
32
MODE_FULL = 1   # draw full dependency graph for all selected packages
33
MODE_PKG  = 2   # draw dependency graph for a given package
34
mode = 0
35
​
36
# Limit drawing the dependency graph to this depth. 0 means 'no limit'.
37
max_depth = 0
38
​
39
# Whether to draw the transitive dependencies
40
transitive = True
41
​
42
parser = argparse.ArgumentParser(description="Graph packages dependencies")
43
parser.add_argument("--check-only", "-C", dest="check_only", action="store_true", default=False,
44
                    help="Only do the dependency checks (circular deps...)")
45
parser.add_argument("--outfile", "-o", metavar="OUT_FILE", dest="outfile",
46
                    help="File in which to generate the dot representation")
47
parser.add_argument("--package", '-p', metavar="PACKAGE",
48
                    help="Graph the dependencies of PACKAGE")
49
parser.add_argument("--depth", '-d', metavar="DEPTH", dest="depth", type=int, default=0,
50
                    help="Limit the dependency graph to DEPTH levels; 0 means no limit.")
51
parser.add_argument("--stop-on", "-s", metavar="PACKAGE", dest="stop_list", action="append",
52
                    help="Do not graph past this package (can be given multiple times)." \
53
                       + " Can be a package name or a glob, " \
54
                       + " 'virtual' to stop on virtual packages, or " \
55
                       + "'host' to stop on host packages.")
56
parser.add_argument("--exclude", "-x", metavar="PACKAGE", dest="exclude_list", action="append",
57
                    help="Like --stop-on, but do not add PACKAGE to the graph.")
58
parser.add_argument("--colours", "-c", metavar="COLOR_LIST", dest="colours",
59
                    default="lightblue,grey,gainsboro",
60
                    help="Comma-separated list of the three colours to use" \
61
                       + " to draw the top-level package, the target" \
62
                       + " packages, and the host packages, in this order." \
63
                       + " Defaults to: 'lightblue,grey,gainsboro'")
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.