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 <[email protected]> --- scripts/oe-depends-dot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/oe-depends-dot b/scripts/oe-depends-dot index 560d2fd2bb..92e68e74ae 100755 --- a/scripts/oe-depends-dot +++ b/scripts/oe-depends-dot @@ -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): """ -- 2.55.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#245070): https://lists.openembedded.org/g/openembedded-core/message/245070 Mute This Topic: https://lists.openembedded.org/mt/121082985/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
