[OE-core] [bitbake-devel] [RFC PATCH] data_smart: Drop expand parameter default
Robert Yang
liezhi.yang at windriver.com
Fri Jun 19 02:25:10 UTC 2015
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 at 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):
>
>
More information about the Openembedded-core
mailing list