From 4628fe12e7f2767d243949197c8326e3b7396301 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 2 Feb 2016 23:49:09 +0000 Subject: bitbake: 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. (Bitbake rev: 7c3b99c6a716095af3ffce0b15110e91fb49c913) Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/ast.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bitbake/lib/bb/parse/ast.py') diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index cff0d2b453..933a06e9bf 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/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 v1.2.3-54-g00ecf