From: Robert Yang Date: Wed, 25 May 2016 09:11:06 +0000 (-0700) Subject: utility-tasks.bbclass: fix do_listtasks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1357d837c72abd1d9552aa77fd63126f7275aa23;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git utility-tasks.bbclass: fix do_listtasks It lists deleted tasks which is unexpected, use __BBTASKS to fix the problem since deltask() which is defined in bitbake/lib/bb/build.py updates __BBTASKS correctly. Signed-off-by: Robert Yang --- diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass index 7bc584abb9b..b06d335f66d 100644 --- a/meta/classes/utility-tasks.bbclass +++ b/meta/classes/utility-tasks.bbclass @@ -3,14 +3,14 @@ do_listtasks[nostamp] = "1" python do_listtasks() { taskdescs = {} maxlen = 0 - for e in d.keys(): - if d.getVarFlag(e, 'task', True): - maxlen = max(maxlen, len(e)) - if e.endswith('_setscene'): - desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc', True) or '') - else: - desc = d.getVarFlag(e, 'doc', True) or '' - taskdescs[e] = desc + bbtasks = d.getVar('__BBTASKS', True) + for task in bbtasks: + maxlen = max(maxlen, len(task)) + if task.endswith('_setscene'): + desc = "%s (setscene version)" % (d.getVarFlag(task[:-9], 'doc', True) or '') + else: + desc = d.getVarFlag(task, 'doc', True) or '' + taskdescs[task] = desc tasks = sorted(taskdescs.keys()) for taskname in tasks: