diff options
author | Ross Burton <ross.burton@arm.com> | 2024-11-27 15:44:28 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-28 00:06:24 +0000 |
commit | ef5aaedf2a47a9d132557715381cdc879ec8f91b (patch) | |
tree | 88608a8e5c59932095d17bebc4157d7e91d59d31 /bitbake | |
parent | a8a11cbc79f73d48916ffa7594c60e400dcc3bcc (diff) | |
download | poky-ef5aaedf2a47a9d132557715381cdc879ec8f91b.tar.gz |
bitbake: bb/build: add a function to list the tasks in a datastore
There's no easy way to list all of the tasks in a recipe, you can either
look at __BBTASKS (internal variable, shouldn't be used) or iterate all
items in the datastore looking for variables with the 'task' flag set
(which is slow).
Solve this problem by adding a bb.build.listtasks() function that
returns an immutable copy of the __BBTASSK variable.
(Bitbake rev: 185c4b803962b20ba65a7d885dfe1a14e68736ef)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/build.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 9f9285de3d..6e0459d87a 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -1028,3 +1028,9 @@ def tasksbetween(task_start, task_end, d): | |||
1028 | chain.pop() | 1028 | chain.pop() |
1029 | follow_chain(task_start, task_end) | 1029 | follow_chain(task_start, task_end) |
1030 | return outtasks | 1030 | return outtasks |
1031 | |||
1032 | def listtasks(d): | ||
1033 | """ | ||
1034 | Return the list of tasks in the current recipe. | ||
1035 | """ | ||
1036 | return tuple(d.getVar('__BBTASKS', False) or ()) | ||