[bitbake-devel] [RFC PATCH] data_smart: Drop expand parameter default

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jun 18 14:17:28 UTC 2015


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 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 bitbake-devel mailing list