diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-14 21:59:21 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-15 12:12:35 +0000 |
commit | f966c544aa4da61a19bc0d751c2bbf0f66028791 (patch) | |
tree | 472ce0b32e8f7731f7ea5f32f20ce10f9ed413ef /bitbake/lib/bb | |
parent | 7e6f9baae14d8a47bc152c65b67f5d7f15039a1a (diff) | |
download | poky-f966c544aa4da61a19bc0d751c2bbf0f66028791.tar.gz |
bitbake: 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.
(Bitbake rev: 0b9d117631ce909312d53b93289e61defc6be01c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/codeparser.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py index 979e6bdfd9..e44e791585 100644 --- a/bitbake/lib/bb/codeparser.py +++ b/bitbake/lib/bb/codeparser.py | |||
@@ -35,7 +35,7 @@ def check_indent(codestr): | |||
35 | 35 | ||
36 | class CodeParserCache(MultiProcessCache): | 36 | class CodeParserCache(MultiProcessCache): |
37 | cache_file_name = "bb_codeparser.dat" | 37 | cache_file_name = "bb_codeparser.dat" |
38 | CACHE_VERSION = 2 | 38 | CACHE_VERSION = 3 |
39 | 39 | ||
40 | def __init__(self): | 40 | def __init__(self): |
41 | MultiProcessCache.__init__(self) | 41 | MultiProcessCache.__init__(self) |
@@ -101,6 +101,7 @@ class BufferedLogger(Logger): | |||
101 | 101 | ||
102 | class PythonParser(): | 102 | class PythonParser(): |
103 | getvars = ("d.getVar", "bb.data.getVar", "data.getVar", "d.appendVar", "d.prependVar") | 103 | getvars = ("d.getVar", "bb.data.getVar", "data.getVar", "d.appendVar", "d.prependVar") |
104 | containsfuncs = ("bb.utils.contains", "base_contains", "oe.utils.contains") | ||
104 | execfuncs = ("bb.build.exec_func", "bb.build.exec_task") | 105 | execfuncs = ("bb.build.exec_func", "bb.build.exec_task") |
105 | 106 | ||
106 | def warn(self, func, arg): | 107 | def warn(self, func, arg): |
@@ -119,7 +120,7 @@ class PythonParser(): | |||
119 | 120 | ||
120 | def visit_Call(self, node): | 121 | def visit_Call(self, node): |
121 | name = self.called_node_name(node.func) | 122 | name = self.called_node_name(node.func) |
122 | if name in self.getvars: | 123 | if name in self.getvars or name in self.containsfuncs: |
123 | if isinstance(node.args[0], ast.Str): | 124 | if isinstance(node.args[0], ast.Str): |
124 | self.var_references.add(node.args[0].s) | 125 | self.var_references.add(node.args[0].s) |
125 | else: | 126 | else: |