diff options
author | Rusty Howell <rhowell@control4.com> | 2023-07-03 13:50:40 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-07-07 06:51:45 -1000 |
commit | c49914bb3cb6116f2e1bed7de82a702c2e4f7b5d (patch) | |
tree | a175852d16b3bf11fb68717ff5086b2346a4bfe2 /scripts/oe-depends-dot | |
parent | 698a70eab4384ee4938cb4550fa8469d62db786b (diff) | |
download | openembedded-core-contrib-c49914bb3cb6116f2e1bed7de82a702c2e4f7b5d.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.
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/oe-depends-dot')
-rwxr-xr-x | scripts/oe-depends-dot | 21 |
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): def __init__(self): parser = argparse.ArgumentParser( description="Analyse recipe-depends.dot generated by bitbake -g", - epilog="Use %(prog)s --help to get help") + formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument("dotfile", help = "Specify the dotfile", nargs = 1, action='store', default='') parser.add_argument("-k", "--key", @@ -32,6 +32,21 @@ class Dot(object): " For example, A->B, B->C, A->C, then A->C can be removed.", action="store_true", default=False) + parser.epilog = """ +Examples: +First generate the .dot file: + bitbake -g core-image-minimal + +To find out why a package is being built: + %(prog)s -k <package> -w ./task-depends.dot + +To find out what a package depends on: + %(prog)s -k <package> -d ./task-depends.dot + +Reduce the .dot file packages only, no tasks: + %(prog)s -r ./task-depends.dot +""" + self.args = parser.parse_args() if len(sys.argv) != 3 and len(sys.argv) < 5: @@ -99,6 +114,10 @@ class Dot(object): if key == "meta-world-pkgdata": continue dep = m.group(2) + key = key.split('.')[0] + dep = dep.split('.')[0] + if key == dep: + continue if key in depends: if not key in depends[key]: depends[key].add(dep) |