summaryrefslogtreecommitdiffstats
path: root/lib/bb/codeparser.py
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:24 +0100
commitcf763cddc3faa2361b4c4dbd08419e4ebabf208f (patch)
treebefbf20e22d4f998c799a01095a41bb7c37286aa /lib/bb/codeparser.py
parentc40a4100ddb841d231360344616e59ab98e61fb5 (diff)
downloadopenembedded-core-contrib-cf763cddc3faa2361b4c4dbd08419e4ebabf208f.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/codeparser.py')
-rw-r--r--lib/bb/codeparser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py
index 8439efbb2e..2e8de12f33 100644
--- a/lib/bb/codeparser.py
+++ b/lib/bb/codeparser.py
@@ -35,7 +35,7 @@ def check_indent(codestr):
class CodeParserCache(MultiProcessCache):
cache_file_name = "bb_codeparser.dat"
- CACHE_VERSION = 5
+ CACHE_VERSION = 6
def __init__(self):
MultiProcessCache.__init__(self)
@@ -102,7 +102,7 @@ class BufferedLogger(Logger):
self.buffer = []
class PythonParser():
- getvars = ("d.getVar", "bb.data.getVar", "data.getVar", "d.appendVar", "d.prependVar")
+ getvars = (".getVar", ".appendVar", ".prependVar")
containsfuncs = ("bb.utils.contains", "base_contains", "oe.utils.contains", "bb.utils.contains_any")
execfuncs = ("bb.build.exec_func", "bb.build.exec_task")
@@ -122,7 +122,7 @@ class PythonParser():
def visit_Call(self, node):
name = self.called_node_name(node.func)
- if name in self.getvars or name in self.containsfuncs:
+ if name and name.endswith(self.getvars) or name in self.containsfuncs:
if isinstance(node.args[0], ast.Str):
varname = node.args[0].s
if name in self.containsfuncs and isinstance(node.args[1], ast.Str):