mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +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:
parent
97323f10b7
commit
5d95623708
|
@ -9,18 +9,17 @@ do_listtasks[nostamp] = "1"
|
|||
python do_listtasks() {
|
||||
taskdescs = {}
|
||||
maxlen = 0
|
||||
for e in d.keys():
|
||||
if d.getVarFlag(e, 'task'):
|
||||
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
|
||||
for t in bb.build.listtasks(d):
|
||||
maxlen = max(maxlen, len(t))
|
||||
|
||||
tasks = sorted(taskdescs.keys())
|
||||
for taskname in tasks:
|
||||
bb.plain("%s %s" % (taskname.ljust(maxlen), taskdescs[taskname]))
|
||||
if t.endswith('_setscene'):
|
||||
desc = "%s (setscene version)" % (d.getVarFlag(t[:-9], 'doc') or '')
|
||||
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 ?= ""
|
||||
|
|
Loading…
Reference in New Issue
Block a user