mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 09:49:33 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
97323f10b7
commit
5d95623708
@@ -9,18 +9,17 @@ do_listtasks[nostamp] = "1"
|
|||||||
python do_listtasks() {
|
python do_listtasks() {
|
||||||
taskdescs = {}
|
taskdescs = {}
|
||||||
maxlen = 0
|
maxlen = 0
|
||||||
for e in d.keys():
|
for t in bb.build.listtasks(d):
|
||||||
if d.getVarFlag(e, 'task'):
|
maxlen = max(maxlen, len(t))
|
||||||
maxlen = max(maxlen, len(e))
|
|
||||||
if e.endswith('_setscene'):
|
|
||||||
desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '')
|
|
||||||
else:
|
|
||||||
desc = d.getVarFlag(e, 'doc') or ''
|
|
||||||
taskdescs[e] = desc
|
|
||||||
|
|
||||||
tasks = sorted(taskdescs.keys())
|
if t.endswith('_setscene'):
|
||||||
for taskname in tasks:
|
desc = "%s (setscene version)" % (d.getVarFlag(t[:-9], 'doc') or '')
|
||||||
bb.plain("%s %s" % (taskname.ljust(maxlen), taskdescs[taskname]))
|
else:
|
||||||
|
desc = d.getVarFlag(t, 'doc') or ''
|
||||||
|
taskdescs[t] = desc
|
||||||
|
|
||||||
|
for task, doc in sorted(taskdescs.items()):
|
||||||
|
bb.plain("%s %s" % (task.ljust(maxlen), doc))
|
||||||
}
|
}
|
||||||
|
|
||||||
CLEANFUNCS ?= ""
|
CLEANFUNCS ?= ""
|
||||||
|
|||||||
Reference in New Issue
Block a user