[OE-core] [PATCH 1/2] utility-tasks.bbclass: fix do_listtasks
Richard Purdie
richard.purdie at linuxfoundation.org
Thu May 26 21:10:57 UTC 2016
On Wed, 2016-05-25 at 02:23 -0700, Robert Yang wrote:
> 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 <liezhi.yang at windriver.com>
> ---
> meta/classes/utility-tasks.bbclass | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/meta/classes/utility-tasks.bbclass
> b/meta/classes/utility-tasks.bbclass
> index 7bc584a..b06d335 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:
__BBTASKS is a bitbake internal variable and OE should not know or care
about it, its implementation may change without warning and I won't
take bug reports about that.
We need to fix this differently.
Cheers,
Richard
More information about the Openembedded-core
mailing list