* [RFC PATCH] data_smart: Drop expand parameter default
@ 2015-06-18 14:17 Richard Purdie
2015-06-19 2:25 ` Robert Yang
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2015-06-18 14:17 UTC (permalink / raw)
To: bitbake-devel; +Cc: openembedded-core
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.
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):
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [bitbake-devel] [RFC PATCH] data_smart: Drop expand parameter default
2015-06-18 14:17 [RFC PATCH] data_smart: Drop expand parameter default Richard Purdie
@ 2015-06-19 2:25 ` Robert Yang
0 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2015-06-19 2:25 UTC (permalink / raw)
To: Richard Purdie, bitbake-devel; +Cc: openembedded-core
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):
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] data_smart: Drop expand parameter default
@ 2015-06-19 2:25 ` Robert Yang
0 siblings, 0 replies; 5+ messages in thread
From: Robert Yang @ 2015-06-19 2:25 UTC (permalink / raw)
To: Richard Purdie, bitbake-devel; +Cc: openembedded-core
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):
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [bitbake-devel] [RFC PATCH] data_smart: Drop expand parameter default
2015-06-19 2:25 ` Robert Yang
@ 2015-06-19 8:24 ` Richard Purdie
-1 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2015-06-19 8:24 UTC (permalink / raw)
To: Robert Yang; +Cc: bitbake-devel, openembedded-core
On Fri, 2015-06-19 at 10:25 +0800, Robert Yang wrote:
>
> 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.
The idea would be to get there, yes. How quickly we could do it is a
good question but this would be the first step.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC PATCH] data_smart: Drop expand parameter default
@ 2015-06-19 8:24 ` Richard Purdie
0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2015-06-19 8:24 UTC (permalink / raw)
To: Robert Yang; +Cc: bitbake-devel, openembedded-core
On Fri, 2015-06-19 at 10:25 +0800, Robert Yang wrote:
>
> 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.
The idea would be to get there, yes. How quickly we could do it is a
good question but this would be the first step.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-19 8:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 14:17 [RFC PATCH] data_smart: Drop expand parameter default Richard Purdie
2015-06-19 2:25 ` [bitbake-devel] " Robert Yang
2015-06-19 2:25 ` Robert Yang
2015-06-19 8:24 ` [bitbake-devel] " Richard Purdie
2015-06-19 8:24 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.