Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Robert Yang <liezhi.yang@windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/2] utility-tasks.bbclass: fix do_listtasks
Date: Thu, 26 May 2016 22:10:57 +0100	[thread overview]
Message-ID: <1464297057.19134.66.camel@linuxfoundation.org> (raw)
In-Reply-To: <1357d837c72abd1d9552aa77fd63126f7275aa23.1464168189.git.liezhi.yang@windriver.com>

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@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


  parent reply	other threads:[~2016-05-26 21:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25  9:23 [PATCH 0/2] Fix utility-tasks.bbclass and nopackages.bbclass Robert Yang
2016-05-25  9:23 ` [PATCH 1/2] utility-tasks.bbclass: fix do_listtasks Robert Yang
2016-05-25 11:17   ` Burton, Ross
2016-05-26  8:12     ` Robert Yang
2016-05-26 14:30       ` Christopher Larson
2016-05-26 21:10   ` Richard Purdie [this message]
2016-05-25  9:23 ` [PATCH 2/2] nopackages.bbclass: deltask foo_setscene Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464297057.19134.66.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox