summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRusty Howell <rhowell@control4.com>2023-07-03 13:50:40 +0000
committerSteve Sakoman <steve@sakoman.com>2023-07-12 05:13:59 -1000
commit8c4bad844f8c1544740fd017ba16f0d062ac4ceb (patch)
tree4d49941c4535e3e6e7caa88f3de413965e58861c /scripts
parent2ae4aff0a627479ecf7330054cdae6efe11d52de (diff)
downloadpoky-8c4bad844f8c1544740fd017ba16f0d062ac4ceb.tar.gz
oe-depends-dot: Handle new format for task-depends.dot
The .dot file created by `bitbake -g` changed formats a while ago, which broke oe-depends-dot. Also add some useful examples to the --help output. (From OE-Core rev: c49914bb3cb6116f2e1bed7de82a702c2e4f7b5d) Signed-off-by: Rusty Howell <rustyhowell@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-depends-dot21
1 files changed, 20 insertions, 1 deletions
diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot
index 5eb3e12769..1c2d51c6ec 100755
--- a/scripts/oe-depends-dot
+++ b/scripts/oe-depends-dot
@@ -15,7 +15,7 @@ class Dot(object):
15 def __init__(self): 15 def __init__(self):
16 parser = argparse.ArgumentParser( 16 parser = argparse.ArgumentParser(
17 description="Analyse recipe-depends.dot generated by bitbake -g", 17 description="Analyse recipe-depends.dot generated by bitbake -g",
18 epilog="Use %(prog)s --help to get help") 18 formatter_class=argparse.RawDescriptionHelpFormatter)
19 parser.add_argument("dotfile", 19 parser.add_argument("dotfile",
20 help = "Specify the dotfile", nargs = 1, action='store', default='') 20 help = "Specify the dotfile", nargs = 1, action='store', default='')
21 parser.add_argument("-k", "--key", 21 parser.add_argument("-k", "--key",
@@ -32,6 +32,21 @@ class Dot(object):
32 " For example, A->B, B->C, A->C, then A->C can be removed.", 32 " For example, A->B, B->C, A->C, then A->C can be removed.",
33 action="store_true", default=False) 33 action="store_true", default=False)
34 34
35 parser.epilog = """
36Examples:
37First generate the .dot file:
38 bitbake -g core-image-minimal
39
40To find out why a package is being built:
41 %(prog)s -k <package> -w ./task-depends.dot
42
43To find out what a package depends on:
44 %(prog)s -k <package> -d ./task-depends.dot
45
46Reduce the .dot file packages only, no tasks:
47 %(prog)s -r ./task-depends.dot
48"""
49
35 self.args = parser.parse_args() 50 self.args = parser.parse_args()
36 51
37 if len(sys.argv) != 3 and len(sys.argv) < 5: 52 if len(sys.argv) != 3 and len(sys.argv) < 5:
@@ -99,6 +114,10 @@ class Dot(object):
99 if key == "meta-world-pkgdata": 114 if key == "meta-world-pkgdata":
100 continue 115 continue
101 dep = m.group(2) 116 dep = m.group(2)
117 key = key.split('.')[0]
118 dep = dep.split('.')[0]
119 if key == dep:
120 continue
102 if key in depends: 121 if key in depends:
103 if not key in depends[key]: 122 if not key in depends[key]:
104 depends[key].add(dep) 123 depends[key].add(dep)