summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2014-02-24 16:05:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-25 08:01:09 +0000
commite4d1779c82a64bcaa1e5dca65c536a85dd684226 (patch)
treee9ca2b3b0e8ced9a402b4585224fc3eb4d1fd552
parentae1265809503494f4c5da21c8335cedc3569ba62 (diff)
downloadpoky-e4d1779c82a64bcaa1e5dca65c536a85dd684226.tar.gz
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]. (From OE-Core rev: 36828f8a0db83b5222a8589984e4a02aeb00eada) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/utility-tasks.bbclass17
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 @@
1addtask listtasks 1addtask listtasks
2do_listtasks[nostamp] = "1" 2do_listtasks[nostamp] = "1"
3python do_listtasks() { 3python do_listtasks() {
4 import sys 4 taskdescs = {}
5 # emit variables and shell functions 5 maxlen = 0
6 #bb.data.emit_env(sys.__stdout__, d)
7 # emit the metadata which isnt valid shell
8 for e in d.keys(): 6 for e in d.keys():
9 if d.getVarFlag(e, 'task'): 7 if d.getVarFlag(e, 'task'):
10 bb.plain("%s" % e) 8 maxlen = max(maxlen, len(e))
9 if e.endswith('_setscene'):
10 desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '')
11 else:
12 desc = d.getVarFlag(e, 'doc') or ''
13 taskdescs[e] = desc
14
15 tasks = sorted(taskdescs.keys())
16 for taskname in tasks:
17 bb.plain("%s %s" % (taskname.ljust(maxlen), taskdescs[taskname]))
11} 18}
12 19
13CLEANFUNCS ?= "" 20CLEANFUNCS ?= ""