summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2011-10-28 23:06:18 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-30 16:16:13 +0000
commitc61f04c34ef581d50dbb6e011ca7460308ed284d (patch)
tree0051dee97aaa0cec7433949c04e6a3d853c7fc7b /bitbake
parent2b26745c70a01bbabf5a303fe12a8b3b41071890 (diff)
downloadpoky-c61f04c34ef581d50dbb6e011ca7460308ed284d.tar.gz
codeparser: drop expand tracking
There are two usual cases involving bb.data.expand: - Calling it with a string literal -- "bb.data.expand('${FOO}/${BAZ}/bleh', d)". - Calling it on getVar results (legacy) -- "bb.data.expand(bb.data.getVar('FOO', d), d)" Nothing in any of the usual layers uses it in any other way, and I'm having trouble coming up with any real use cases beyond this. The first of the above cases is already tracked, via the expandWithRefs called on the python code string. The second didn't emit a warning anyway, since the getVar was already handled. Given this, I see no reason for us to maintain explicit expansion tracking. Further, we weren't using its results anyway (the var_expands member). (Bitbake rev: 405dfe69e6a608826e599ebf2f83ef8cf5083b96) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/codeparser.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index 9a692a0c8e..615fb7d610 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -152,7 +152,6 @@ def parser_cache_savemerge(d):
152 152
153class PythonParser(): 153class PythonParser():
154 getvars = ("d.getVar", "bb.data.getVar", "data.getVar") 154 getvars = ("d.getVar", "bb.data.getVar", "data.getVar")
155 expands = ("d.expand", "bb.data.expand", "data.expand")
156 execfuncs = ("bb.build.exec_func", "bb.build.exec_task") 155 execfuncs = ("bb.build.exec_func", "bb.build.exec_task")
157 156
158 def warn(self, func, arg): 157 def warn(self, func, arg):
@@ -176,15 +175,6 @@ class PythonParser():
176 self.var_references.add(node.args[0].s) 175 self.var_references.add(node.args[0].s)
177 else: 176 else:
178 self.warn(node.func, node.args[0]) 177 self.warn(node.func, node.args[0])
179 elif name in self.expands:
180 if isinstance(node.args[0], ast.Str):
181 self.warn(node.func, node.args[0])
182 self.var_expands.add(node.args[0].s)
183 elif isinstance(node.args[0], ast.Call) and \
184 self.called_node_name(node.args[0].func) in self.getvars:
185 pass
186 else:
187 self.warn(node.func, node.args[0])
188 elif name in self.execfuncs: 178 elif name in self.execfuncs:
189 if isinstance(node.args[0], ast.Str): 179 if isinstance(node.args[0], ast.Str):
190 self.var_execs.add(node.args[0].s) 180 self.var_execs.add(node.args[0].s)
@@ -210,7 +200,6 @@ class PythonParser():
210 self.var_references = set() 200 self.var_references = set()
211 self.var_execs = set() 201 self.var_execs = set()
212 self.execs = set() 202 self.execs = set()
213 self.var_expands = set()
214 self.references = set() 203 self.references = set()
215 204
216 self.unhandled_message = "in call of %s, argument '%s' is not a string literal" 205 self.unhandled_message = "in call of %s, argument '%s' is not a string literal"