@@ -17,7 +17,8 @@ class Dot(object):
description="Analyse task-depends.dot generated by bitbake -g",
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("dotfile",
- help = "Specify the dotfile", action='store', default='')
+ help = "Dotfile to inspect (default: ./task-depends.dot)",
+ nargs='?', action='store', default='./task-depends.dot')
parser.add_argument("-k", "--key",
help = "Specify the key, e.g., recipe name",
action="store", default='')
@@ -49,6 +50,10 @@ Reduce the .dot file packages only, no tasks:
self.args = parser.parse_args()
+ if not os.path.exists(self.args.dotfile):
+ print(f"Dotfile {self.args.dotfile} does not exists. Did you run 'bitbake -g <recipe>'?")
+ sys.exit(1)
+
@staticmethod
def insert_dep_chain(chain, rdeps, alldeps):
"""
Running this script mostly happens after running 'bitbake -g <recipe>', which generates the task-depends.dot file in the current working directory with the name 'task-depends.dot'. Make the dotfile positional argument optional with './task-depends.dot' as default value, so we can run the command without specify it each time. If the file doesn't exist, hint the user at what to do (run bitbake -g). Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> --- scripts/oe-depends-dot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)