summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-14 21:59:21 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-12 17:49:37 +0100
commit56eac6ed2c14158e4f854f304fc875cee867f1b6 (patch)
tree5ebc88dcb609485597000c98b0873488ccc99a25
parent6568534f355fa8b298dac93bfe9e956c3036ee8c (diff)
downloadbitbake-56eac6ed2c14158e4f854f304fc875cee867f1b6.tar.gz
codeparser: Track bb.utils.contains usage
The bb.utils.contains function usage is getting increasingly used in the metadata but isn't handled automatically by the python dependency tracking code. This patch changes that and also adds the "OE" names for the functions. Whilst there are reasons this is a bad idea, its likely outweighed by the shear number of these references and the current holes in dependency information which we're now relying heavily upon. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/codeparser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bb/codeparser.py b/lib/bb/codeparser.py
index 979e6bdfd..e44e79158 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 = 2
+ CACHE_VERSION = 3
def __init__(self):
MultiProcessCache.__init__(self)
@@ -101,6 +101,7 @@ class BufferedLogger(Logger):
class PythonParser():
getvars = ("d.getVar", "bb.data.getVar", "data.getVar", "d.appendVar", "d.prependVar")
+ containsfuncs = ("bb.utils.contains", "base_contains", "oe.utils.contains")
execfuncs = ("bb.build.exec_func", "bb.build.exec_task")
def warn(self, func, arg):
@@ -119,7 +120,7 @@ class PythonParser():
def visit_Call(self, node):
name = self.called_node_name(node.func)
- if name in self.getvars:
+ if name in self.getvars or name in self.containsfuncs:
if isinstance(node.args[0], ast.Str):
self.var_references.add(node.args[0].s)
else: