diff options
author | Ross Burton <ross.burton@arm.com> | 2024-12-11 12:08:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-12 13:31:27 +0000 |
commit | 5d956237085d2c38491120f7cf4d6e3429fabfa4 (patch) | |
tree | 6c934dad5e52fc180bc0a09e85f3ab6101770344 /meta/classes-global | |
parent | 97323f10b74b3ee17dd80d2f55a11dd95b3ab5e8 (diff) | |
download | poky-5d956237085d2c38491120f7cf4d6e3429fabfa4.tar.gz |
classes/utility-tasks: port do_listtasks to use bb.build.listtasks
Instead of iterating every datastore value by hand to find tasks, use
the new bb.build.listtasks() function (bitbake 185c4b)
(From OE-Core rev: 466c3ed0d01bc70caa29d5eb8bb99f7d0e6e710c)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/utility-tasks.bbclass | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/meta/classes-global/utility-tasks.bbclass b/meta/classes-global/utility-tasks.bbclass index ae2da330b8..394cc3158d 100644 --- a/meta/classes-global/utility-tasks.bbclass +++ b/meta/classes-global/utility-tasks.bbclass | |||
@@ -9,18 +9,17 @@ do_listtasks[nostamp] = "1" | |||
9 | python do_listtasks() { | 9 | python do_listtasks() { |
10 | taskdescs = {} | 10 | taskdescs = {} |
11 | maxlen = 0 | 11 | maxlen = 0 |
12 | for e in d.keys(): | 12 | for t in bb.build.listtasks(d): |
13 | if d.getVarFlag(e, 'task'): | 13 | maxlen = max(maxlen, len(t)) |
14 | maxlen = max(maxlen, len(e)) | 14 | |
15 | if e.endswith('_setscene'): | 15 | if t.endswith('_setscene'): |
16 | desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '') | 16 | desc = "%s (setscene version)" % (d.getVarFlag(t[:-9], 'doc') or '') |
17 | else: | 17 | else: |
18 | desc = d.getVarFlag(e, 'doc') or '' | 18 | desc = d.getVarFlag(t, 'doc') or '' |
19 | taskdescs[e] = desc | 19 | taskdescs[t] = desc |
20 | 20 | ||
21 | tasks = sorted(taskdescs.keys()) | 21 | for task, doc in sorted(taskdescs.items()): |
22 | for taskname in tasks: | 22 | bb.plain("%s %s" % (task.ljust(maxlen), doc)) |
23 | bb.plain("%s %s" % (taskname.ljust(maxlen), taskdescs[taskname])) | ||
24 | } | 23 | } |
25 | 24 | ||
26 | CLEANFUNCS ?= "" | 25 | CLEANFUNCS ?= "" |