From 7c3b99c6a716095af3ffce0b15110e91fb49c913 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 2 Feb 2016 23:49:09 +0000 Subject: lib/bb: Add expansion parameter to getVarFlag This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the expand default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVar *` There should be no functional change from this patch. Signed-off-by: Richard Purdie --- lib/bb/parse/ast.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/bb/parse/ast.py') diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py index cff0d2b45..933a06e9b 100644 --- a/lib/bb/parse/ast.py +++ b/lib/bb/parse/ast.py @@ -83,7 +83,7 @@ class DataNode(AstNode): def getFunc(self, key, data): if 'flag' in self.groupd and self.groupd['flag'] != None: - return data.getVarFlag(key, self.groupd['flag'], noweakdefault=True) + return data.getVarFlag(key, self.groupd['flag'], expand=False, noweakdefault=True) else: return data.getVar(key, False, noweakdefault=True, parsing=True) @@ -213,7 +213,7 @@ class ExportFuncsNode(AstNode): for func in self.n: calledfunc = self.classname + "_" + func - if data.getVar(func, False) and not data.getVarFlag(func, 'export_func'): + if data.getVar(func, False) and not data.getVarFlag(func, 'export_func', False): continue if data.getVar(func, False): @@ -221,15 +221,15 @@ class ExportFuncsNode(AstNode): data.setVarFlag(func, 'func', None) for flag in [ "func", "python" ]: - if data.getVarFlag(calledfunc, flag): - data.setVarFlag(func, flag, data.getVarFlag(calledfunc, flag)) + if data.getVarFlag(calledfunc, flag, False): + data.setVarFlag(func, flag, data.getVarFlag(calledfunc, flag, False)) for flag in [ "dirs" ]: - if data.getVarFlag(func, flag): - data.setVarFlag(calledfunc, flag, data.getVarFlag(func, flag)) + if data.getVarFlag(func, flag, False): + data.setVarFlag(calledfunc, flag, data.getVarFlag(func, flag, False)) data.setVarFlag(func, "filename", "autogenerated") data.setVarFlag(func, "lineno", 1) - if data.getVarFlag(calledfunc, "python"): + if data.getVarFlag(calledfunc, "python", False): data.setVar(func, " bb.build.exec_func('" + calledfunc + "', d)\n", parsing=True) else: if "-" in self.classname: -- cgit 1.2.3-korg