diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2014-02-24 16:05:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-24 16:18:57 +0000 |
commit | 36828f8a0db83b5222a8589984e4a02aeb00eada (patch) | |
tree | 2c0235a1087772a89e2189f504fc2fac4a6a2304 /meta/classes | |
parent | d000761acdb2645ac879d8d9d6b022770545f644 (diff) | |
download | openembedded-core-36828f8a0db83b5222a8589984e4a02aeb00eada.tar.gz openembedded-core-36828f8a0db83b5222a8589984e4a02aeb00eada.tar.bz2 openembedded-core-36828f8a0db83b5222a8589984e4a02aeb00eada.zip |
classes/utility-tasks: make do_listtasks a little more friendly
* Sort the list so it's at least in some form of logical order. I looked
at sorting by dependencies, but that's a topological sort, and given
no such function is shipped as part of the python standard libraries
it would seem excessive to pull one in just for this. In any case, I'm
not sure that for the data we have this would lead to any particularly
pleasing result.
* Show the doc values as defined in documentation.conf (where present)
as a description
Addresses [YOCTO #4856].
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/utility-tasks.bbclass | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass index 507e0f1c94..1792f18e8c 100644 --- a/meta/classes/utility-tasks.bbclass +++ b/meta/classes/utility-tasks.bbclass @@ -1,13 +1,20 @@ addtask listtasks do_listtasks[nostamp] = "1" python do_listtasks() { - import sys - # emit variables and shell functions - #bb.data.emit_env(sys.__stdout__, d) - # emit the metadata which isnt valid shell + taskdescs = {} + maxlen = 0 for e in d.keys(): if d.getVarFlag(e, 'task'): - bb.plain("%s" % e) + 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()) + for taskname in tasks: + bb.plain("%s %s" % (taskname.ljust(maxlen), taskdescs[taskname])) } CLEANFUNCS ?= "" |