diff options
-rw-r--r-- | bitbake/lib/bb/cache.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/codeparser.py | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index c04ac13735..28e8a87455 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -37,7 +37,7 @@ import bb.utils | |||
37 | 37 | ||
38 | logger = logging.getLogger("BitBake.Cache") | 38 | logger = logging.getLogger("BitBake.Cache") |
39 | 39 | ||
40 | __cache_version__ = "150" | 40 | __cache_version__ = "151" |
41 | 41 | ||
42 | def getCacheFile(path, filename, data_hash): | 42 | def getCacheFile(path, filename, data_hash): |
43 | return os.path.join(path, filename + "." + data_hash) | 43 | return os.path.join(path, filename + "." + data_hash) |
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py index 89d24ab49a..f76b478a47 100644 --- a/bitbake/lib/bb/codeparser.py +++ b/bitbake/lib/bb/codeparser.py | |||
@@ -117,7 +117,7 @@ class shellCacheLine(object): | |||
117 | 117 | ||
118 | class CodeParserCache(MultiProcessCache): | 118 | class CodeParserCache(MultiProcessCache): |
119 | cache_file_name = "bb_codeparser.dat" | 119 | cache_file_name = "bb_codeparser.dat" |
120 | CACHE_VERSION = 8 | 120 | CACHE_VERSION = 9 |
121 | 121 | ||
122 | def __init__(self): | 122 | def __init__(self): |
123 | MultiProcessCache.__init__(self) | 123 | MultiProcessCache.__init__(self) |
@@ -193,7 +193,8 @@ class BufferedLogger(Logger): | |||
193 | class PythonParser(): | 193 | class PythonParser(): |
194 | getvars = (".getVar", ".appendVar", ".prependVar") | 194 | getvars = (".getVar", ".appendVar", ".prependVar") |
195 | getvarflags = (".getVarFlag", ".appendVarFlag", ".prependVarFlag") | 195 | getvarflags = (".getVarFlag", ".appendVarFlag", ".prependVarFlag") |
196 | containsfuncs = ("bb.utils.contains", "base_contains", "bb.utils.contains_any") | 196 | containsfuncs = ("bb.utils.contains", "base_contains") |
197 | containsanyfuncs = ("bb.utils.contains_any", "bb.utils.filter") | ||
197 | execfuncs = ("bb.build.exec_func", "bb.build.exec_task") | 198 | execfuncs = ("bb.build.exec_func", "bb.build.exec_task") |
198 | 199 | ||
199 | def warn(self, func, arg): | 200 | def warn(self, func, arg): |
@@ -212,13 +213,17 @@ class PythonParser(): | |||
212 | 213 | ||
213 | def visit_Call(self, node): | 214 | def visit_Call(self, node): |
214 | name = self.called_node_name(node.func) | 215 | name = self.called_node_name(node.func) |
215 | if name and (name.endswith(self.getvars) or name.endswith(self.getvarflags) or name in self.containsfuncs): | 216 | if name and (name.endswith(self.getvars) or name.endswith(self.getvarflags) or name in self.containsfuncs or name in self.containsanyfuncs): |
216 | if isinstance(node.args[0], ast.Str): | 217 | if isinstance(node.args[0], ast.Str): |
217 | varname = node.args[0].s | 218 | varname = node.args[0].s |
218 | if name in self.containsfuncs and isinstance(node.args[1], ast.Str): | 219 | if name in self.containsfuncs and isinstance(node.args[1], ast.Str): |
219 | if varname not in self.contains: | 220 | if varname not in self.contains: |
220 | self.contains[varname] = set() | 221 | self.contains[varname] = set() |
221 | self.contains[varname].add(node.args[1].s) | 222 | self.contains[varname].add(node.args[1].s) |
223 | elif name in self.containsanyfuncs and isinstance(node.args[1], ast.Str): | ||
224 | if varname not in self.contains: | ||
225 | self.contains[varname] = set() | ||
226 | self.contains[varname].update(node.args[1].s.split()) | ||
222 | elif name.endswith(self.getvarflags): | 227 | elif name.endswith(self.getvarflags): |
223 | if isinstance(node.args[1], ast.Str): | 228 | if isinstance(node.args[1], ast.Str): |
224 | self.references.add('%s[%s]' % (varname, node.args[1].s)) | 229 | self.references.add('%s[%s]' % (varname, node.args[1].s)) |