summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-03 11:15:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-03 11:24:48 +0100
commitc1f4df4e883c3e03f561071390d8a204240f069a (patch)
tree1d59cbb3acd442b1eac64029b164ca238e7bc17b /bitbake/lib/bb
parentdabd58b030310541b89588ea55a0f372f5b40b52 (diff)
downloadpoky-c1f4df4e883c3e03f561071390d8a204240f069a.tar.gz
bitbake: codeparser: Fix to better catch all getVar references
Currently if you do localdata.getVar, the code parser simply ignores the references. Change the code to use endswith() to catch more of the references. These names are probably unique enough to get away with this. Bump the cache version to ensure things get updated. (Bitbake rev: cf763cddc3faa2361b4c4dbd08419e4ebabf208f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/codeparser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index 8439efbb2e..2e8de12f33 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -35,7 +35,7 @@ def check_indent(codestr):
35 35
36class CodeParserCache(MultiProcessCache): 36class CodeParserCache(MultiProcessCache):
37 cache_file_name = "bb_codeparser.dat" 37 cache_file_name = "bb_codeparser.dat"
38 CACHE_VERSION = 5 38 CACHE_VERSION = 6
39 39
40 def __init__(self): 40 def __init__(self):
41 MultiProcessCache.__init__(self) 41 MultiProcessCache.__init__(self)
@@ -102,7 +102,7 @@ class BufferedLogger(Logger):
102 self.buffer = [] 102 self.buffer = []
103 103
104class PythonParser(): 104class PythonParser():
105 getvars = ("d.getVar", "bb.data.getVar", "data.getVar", "d.appendVar", "d.prependVar") 105 getvars = (".getVar", ".appendVar", ".prependVar")
106 containsfuncs = ("bb.utils.contains", "base_contains", "oe.utils.contains", "bb.utils.contains_any") 106 containsfuncs = ("bb.utils.contains", "base_contains", "oe.utils.contains", "bb.utils.contains_any")
107 execfuncs = ("bb.build.exec_func", "bb.build.exec_task") 107 execfuncs = ("bb.build.exec_func", "bb.build.exec_task")
108 108
@@ -122,7 +122,7 @@ class PythonParser():
122 122
123 def visit_Call(self, node): 123 def visit_Call(self, node):
124 name = self.called_node_name(node.func) 124 name = self.called_node_name(node.func)
125 if name in self.getvars or name in self.containsfuncs: 125 if name and name.endswith(self.getvars) or name in self.containsfuncs:
126 if isinstance(node.args[0], ast.Str): 126 if isinstance(node.args[0], ast.Str):
127 varname = node.args[0].s 127 varname = node.args[0].s
128 if name in self.containsfuncs and isinstance(node.args[1], ast.Str): 128 if name in self.containsfuncs and isinstance(node.args[1], ast.Str):