Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	bitbake-devel <bitbake-devel@lists.openembedded.org>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [bitbake-devel] [RFC PATCH] data_smart: Drop expand parameter default
Date: Fri, 19 Jun 2015 10:25:10 +0800	[thread overview]
Message-ID: <55837D86.3060005@windriver.com> (raw)
In-Reply-To: <1434637048.14710.99.camel@linuxfoundation.org>



On 06/18/2015 10:17 PM, Richard Purdie wrote:
> Rather than just d.getVar(X), force the use of the more explict d.getVar(X, False)
> since at some point in the future, having the default of expansion would
> be nice. This is the first step towards that.

Did you mean that in the future:

d.getVar("PN") equals d.getVar("PN", True) ?

That would be great since expand=True uses more frequently
than False.

// Robert

>
> Layers can update to this calling convention with a command along the lines of:
>
> sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`
>
> Patches for OE-Core and Bitbake are on the mailing lists. Its an open question
> whether we want to do this, on what timescale and whether we do the same
> with getVarFLag at the same time?
>
> Paul confirmed that other layers don't have too many of these unexpanded
> getVar calls.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
> index 9384ffd..1316671 100644
> --- a/bitbake/lib/bb/data_smart.py
> +++ b/bitbake/lib/bb/data_smart.py
> @@ -516,7 +516,7 @@ class DataSmart(MutableMapping):
>                   if len(shortvar) == 0:
>                       override = None
>
> -    def getVar(self, var, expand=False, noweakdefault=False, parsing=False):
> +    def getVar(self, var, expand, noweakdefault=False, parsing=False):
>           return self.getVarFlag(var, "_content", expand, noweakdefault, parsing)
>
>       def _clearOverrides(self, key):
>
>


  reply	other threads:[~2015-06-19  2:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 14:17 [RFC PATCH] data_smart: Drop expand parameter default Richard Purdie
2015-06-19  2:25 ` Robert Yang [this message]
2015-06-19  8:24   ` [bitbake-devel] " Richard Purdie

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=55837D86.3060005@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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