diff options
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/ast.py | 100 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 18 |
4 files changed, 63 insertions, 63 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index eee8d9cddb..c5005aec9a 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py | |||
@@ -62,9 +62,9 @@ def update_mtime(f): | |||
62 | def mark_dependency(d, f): | 62 | def mark_dependency(d, f): |
63 | if f.startswith('./'): | 63 | if f.startswith('./'): |
64 | f = "%s/%s" % (os.getcwd(), f[2:]) | 64 | f = "%s/%s" % (os.getcwd(), f[2:]) |
65 | deps = bb.data.getVar('__depends', d) or set() | 65 | deps = d.getVar('__depends') or set() |
66 | deps.update([(f, cached_mtime(f))]) | 66 | deps.update([(f, cached_mtime(f))]) |
67 | bb.data.setVar('__depends', deps, d) | 67 | d.setVar('__depends', deps) |
68 | 68 | ||
69 | def supports(fn, data): | 69 | def supports(fn, data): |
70 | """Returns true if we have a handler for this file, false otherwise""" | 70 | """Returns true if we have a handler for this file, false otherwise""" |
@@ -90,7 +90,7 @@ def init_parser(d): | |||
90 | 90 | ||
91 | def resolve_file(fn, d): | 91 | def resolve_file(fn, d): |
92 | if not os.path.isabs(fn): | 92 | if not os.path.isabs(fn): |
93 | bbpath = bb.data.getVar("BBPATH", d, True) | 93 | bbpath = d.getVar("BBPATH", True) |
94 | newfn = bb.utils.which(bbpath, fn) | 94 | newfn = bb.utils.which(bbpath, fn) |
95 | if not newfn: | 95 | if not newfn: |
96 | raise IOError("file %s not found in %s" % (fn, bbpath)) | 96 | raise IOError("file %s not found in %s" % (fn, bbpath)) |
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 3f9065a34c..31c930d9cf 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py | |||
@@ -54,7 +54,7 @@ class IncludeNode(AstNode): | |||
54 | """ | 54 | """ |
55 | Include the file and evaluate the statements | 55 | Include the file and evaluate the statements |
56 | """ | 56 | """ |
57 | s = bb.data.expand(self.what_file, data) | 57 | s = data.expand(self.what_file) |
58 | logger.debug(2, "CONF %s:%s: including %s", self.filename, self.lineno, s) | 58 | logger.debug(2, "CONF %s:%s: including %s", self.filename, self.lineno, s) |
59 | 59 | ||
60 | # TODO: Cache those includes... maybe not here though | 60 | # TODO: Cache those includes... maybe not here though |
@@ -69,7 +69,7 @@ class ExportNode(AstNode): | |||
69 | self.var = var | 69 | self.var = var |
70 | 70 | ||
71 | def eval(self, data): | 71 | def eval(self, data): |
72 | bb.data.setVarFlag(self.var, "export", 1, data) | 72 | data.setVarFlag(self.var, "export", 1) |
73 | 73 | ||
74 | class DataNode(AstNode): | 74 | class DataNode(AstNode): |
75 | """ | 75 | """ |
@@ -92,7 +92,7 @@ class DataNode(AstNode): | |||
92 | groupd = self.groupd | 92 | groupd = self.groupd |
93 | key = groupd["var"] | 93 | key = groupd["var"] |
94 | if "exp" in groupd and groupd["exp"] != None: | 94 | if "exp" in groupd and groupd["exp"] != None: |
95 | bb.data.setVarFlag(key, "export", 1, data) | 95 | data.setVarFlag(key, "export", 1) |
96 | if "ques" in groupd and groupd["ques"] != None: | 96 | if "ques" in groupd and groupd["ques"] != None: |
97 | val = self.getFunc(key, data) | 97 | val = self.getFunc(key, data) |
98 | if val == None: | 98 | if val == None: |
@@ -100,7 +100,7 @@ class DataNode(AstNode): | |||
100 | elif "colon" in groupd and groupd["colon"] != None: | 100 | elif "colon" in groupd and groupd["colon"] != None: |
101 | e = data.createCopy() | 101 | e = data.createCopy() |
102 | bb.data.update_data(e) | 102 | bb.data.update_data(e) |
103 | val = bb.data.expand(groupd["value"], e, key + "[:=]") | 103 | val = e.expand(groupd["value"], key + "[:=]") |
104 | elif "append" in groupd and groupd["append"] != None: | 104 | elif "append" in groupd and groupd["append"] != None: |
105 | val = "%s %s" % ((self.getFunc(key, data) or ""), groupd["value"]) | 105 | val = "%s %s" % ((self.getFunc(key, data) or ""), groupd["value"]) |
106 | elif "prepend" in groupd and groupd["prepend"] != None: | 106 | elif "prepend" in groupd and groupd["prepend"] != None: |
@@ -113,11 +113,11 @@ class DataNode(AstNode): | |||
113 | val = groupd["value"] | 113 | val = groupd["value"] |
114 | 114 | ||
115 | if 'flag' in groupd and groupd['flag'] != None: | 115 | if 'flag' in groupd and groupd['flag'] != None: |
116 | bb.data.setVarFlag(key, groupd['flag'], val, data) | 116 | data.setVarFlag(key, groupd['flag'], val) |
117 | elif groupd["lazyques"]: | 117 | elif groupd["lazyques"]: |
118 | bb.data.setVarFlag(key, "defaultval", val, data) | 118 | data.setVarFlag(key, "defaultval", val) |
119 | else: | 119 | else: |
120 | bb.data.setVar(key, val, data) | 120 | data.setVar(key, val) |
121 | 121 | ||
122 | class MethodNode(AstNode): | 122 | class MethodNode(AstNode): |
123 | def __init__(self, filename, lineno, func_name, body): | 123 | def __init__(self, filename, lineno, func_name, body): |
@@ -131,12 +131,12 @@ class MethodNode(AstNode): | |||
131 | if not funcname in bb.methodpool._parsed_fns: | 131 | if not funcname in bb.methodpool._parsed_fns: |
132 | text = "def %s(d):\n" % (funcname) + '\n'.join(self.body) | 132 | text = "def %s(d):\n" % (funcname) + '\n'.join(self.body) |
133 | bb.methodpool.insert_method(funcname, text, self.filename) | 133 | bb.methodpool.insert_method(funcname, text, self.filename) |
134 | anonfuncs = bb.data.getVar('__BBANONFUNCS', data) or [] | 134 | anonfuncs = data.getVar('__BBANONFUNCS') or [] |
135 | anonfuncs.append(funcname) | 135 | anonfuncs.append(funcname) |
136 | bb.data.setVar('__BBANONFUNCS', anonfuncs, data) | 136 | data.setVar('__BBANONFUNCS', anonfuncs) |
137 | else: | 137 | else: |
138 | bb.data.setVarFlag(self.func_name, "func", 1, data) | 138 | data.setVarFlag(self.func_name, "func", 1) |
139 | bb.data.setVar(self.func_name, '\n'.join(self.body), data) | 139 | data.setVar(self.func_name, '\n'.join(self.body)) |
140 | 140 | ||
141 | class PythonMethodNode(AstNode): | 141 | class PythonMethodNode(AstNode): |
142 | def __init__(self, filename, lineno, function, define, body): | 142 | def __init__(self, filename, lineno, function, define, body): |
@@ -152,9 +152,9 @@ class PythonMethodNode(AstNode): | |||
152 | text = '\n'.join(self.body) | 152 | text = '\n'.join(self.body) |
153 | if not bb.methodpool.parsed_module(self.define): | 153 | if not bb.methodpool.parsed_module(self.define): |
154 | bb.methodpool.insert_method(self.define, text, self.filename) | 154 | bb.methodpool.insert_method(self.define, text, self.filename) |
155 | bb.data.setVarFlag(self.function, "func", 1, data) | 155 | data.setVarFlag(self.function, "func", 1) |
156 | bb.data.setVarFlag(self.function, "python", 1, data) | 156 | data.setVarFlag(self.function, "python", 1) |
157 | bb.data.setVar(self.function, text, data) | 157 | data.setVar(self.function, text) |
158 | 158 | ||
159 | class MethodFlagsNode(AstNode): | 159 | class MethodFlagsNode(AstNode): |
160 | def __init__(self, filename, lineno, key, m): | 160 | def __init__(self, filename, lineno, key, m): |
@@ -163,19 +163,19 @@ class MethodFlagsNode(AstNode): | |||
163 | self.m = m | 163 | self.m = m |
164 | 164 | ||
165 | def eval(self, data): | 165 | def eval(self, data): |
166 | if bb.data.getVar(self.key, data): | 166 | if data.getVar(self.key): |
167 | # clean up old version of this piece of metadata, as its | 167 | # clean up old version of this piece of metadata, as its |
168 | # flags could cause problems | 168 | # flags could cause problems |
169 | bb.data.setVarFlag(self.key, 'python', None, data) | 169 | data.setVarFlag(self.key, 'python', None) |
170 | bb.data.setVarFlag(self.key, 'fakeroot', None, data) | 170 | data.setVarFlag(self.key, 'fakeroot', None) |
171 | if self.m.group("py") is not None: | 171 | if self.m.group("py") is not None: |
172 | bb.data.setVarFlag(self.key, "python", "1", data) | 172 | data.setVarFlag(self.key, "python", "1") |
173 | else: | 173 | else: |
174 | bb.data.delVarFlag(self.key, "python", data) | 174 | data.delVarFlag(self.key, "python") |
175 | if self.m.group("fr") is not None: | 175 | if self.m.group("fr") is not None: |
176 | bb.data.setVarFlag(self.key, "fakeroot", "1", data) | 176 | data.setVarFlag(self.key, "fakeroot", "1") |
177 | else: | 177 | else: |
178 | bb.data.delVarFlag(self.key, "fakeroot", data) | 178 | data.delVarFlag(self.key, "fakeroot") |
179 | 179 | ||
180 | class ExportFuncsNode(AstNode): | 180 | class ExportFuncsNode(AstNode): |
181 | def __init__(self, filename, lineno, fns, classes): | 181 | def __init__(self, filename, lineno, fns, classes): |
@@ -197,25 +197,25 @@ class ExportFuncsNode(AstNode): | |||
197 | vars.append([allvars[0], allvars[2]]) | 197 | vars.append([allvars[0], allvars[2]]) |
198 | 198 | ||
199 | for (var, calledvar) in vars: | 199 | for (var, calledvar) in vars: |
200 | if bb.data.getVar(var, data) and not bb.data.getVarFlag(var, 'export_func', data): | 200 | if data.getVar(var) and not data.getVarFlag(var, 'export_func'): |
201 | continue | 201 | continue |
202 | 202 | ||
203 | if bb.data.getVar(var, data): | 203 | if data.getVar(var): |
204 | bb.data.setVarFlag(var, 'python', None, data) | 204 | data.setVarFlag(var, 'python', None) |
205 | bb.data.setVarFlag(var, 'func', None, data) | 205 | data.setVarFlag(var, 'func', None) |
206 | 206 | ||
207 | for flag in [ "func", "python" ]: | 207 | for flag in [ "func", "python" ]: |
208 | if bb.data.getVarFlag(calledvar, flag, data): | 208 | if data.getVarFlag(calledvar, flag): |
209 | bb.data.setVarFlag(var, flag, bb.data.getVarFlag(calledvar, flag, data), data) | 209 | data.setVarFlag(var, flag, data.getVarFlag(calledvar, flag)) |
210 | for flag in [ "dirs" ]: | 210 | for flag in [ "dirs" ]: |
211 | if bb.data.getVarFlag(var, flag, data): | 211 | if data.getVarFlag(var, flag): |
212 | bb.data.setVarFlag(calledvar, flag, bb.data.getVarFlag(var, flag, data), data) | 212 | data.setVarFlag(calledvar, flag, data.getVarFlag(var, flag)) |
213 | 213 | ||
214 | if bb.data.getVarFlag(calledvar, "python", data): | 214 | if data.getVarFlag(calledvar, "python"): |
215 | bb.data.setVar(var, "\tbb.build.exec_func('" + calledvar + "', d)\n", data) | 215 | data.setVar(var, "\tbb.build.exec_func('" + calledvar + "', d)\n") |
216 | else: | 216 | else: |
217 | bb.data.setVar(var, "\t" + calledvar + "\n", data) | 217 | data.setVar(var, "\t" + calledvar + "\n") |
218 | bb.data.setVarFlag(var, 'export_func', '1', data) | 218 | data.setVarFlag(var, 'export_func', '1') |
219 | 219 | ||
220 | class AddTaskNode(AstNode): | 220 | class AddTaskNode(AstNode): |
221 | def __init__(self, filename, lineno, func, before, after): | 221 | def __init__(self, filename, lineno, func, before, after): |
@@ -229,25 +229,25 @@ class AddTaskNode(AstNode): | |||
229 | if self.func[:3] != "do_": | 229 | if self.func[:3] != "do_": |
230 | var = "do_" + self.func | 230 | var = "do_" + self.func |
231 | 231 | ||
232 | bb.data.setVarFlag(var, "task", 1, data) | 232 | data.setVarFlag(var, "task", 1) |
233 | bbtasks = bb.data.getVar('__BBTASKS', data) or [] | 233 | bbtasks = data.getVar('__BBTASKS') or [] |
234 | if not var in bbtasks: | 234 | if not var in bbtasks: |
235 | bbtasks.append(var) | 235 | bbtasks.append(var) |
236 | bb.data.setVar('__BBTASKS', bbtasks, data) | 236 | data.setVar('__BBTASKS', bbtasks) |
237 | 237 | ||
238 | existing = bb.data.getVarFlag(var, "deps", data) or [] | 238 | existing = data.getVarFlag(var, "deps") or [] |
239 | if self.after is not None: | 239 | if self.after is not None: |
240 | # set up deps for function | 240 | # set up deps for function |
241 | for entry in self.after.split(): | 241 | for entry in self.after.split(): |
242 | if entry not in existing: | 242 | if entry not in existing: |
243 | existing.append(entry) | 243 | existing.append(entry) |
244 | bb.data.setVarFlag(var, "deps", existing, data) | 244 | data.setVarFlag(var, "deps", existing) |
245 | if self.before is not None: | 245 | if self.before is not None: |
246 | # set up things that depend on this func | 246 | # set up things that depend on this func |
247 | for entry in self.before.split(): | 247 | for entry in self.before.split(): |
248 | existing = bb.data.getVarFlag(entry, "deps", data) or [] | 248 | existing = data.getVarFlag(entry, "deps") or [] |
249 | if var not in existing: | 249 | if var not in existing: |
250 | bb.data.setVarFlag(entry, "deps", [var] + existing, data) | 250 | data.setVarFlag(entry, "deps", [var] + existing) |
251 | 251 | ||
252 | class BBHandlerNode(AstNode): | 252 | class BBHandlerNode(AstNode): |
253 | def __init__(self, filename, lineno, fns): | 253 | def __init__(self, filename, lineno, fns): |
@@ -255,11 +255,11 @@ class BBHandlerNode(AstNode): | |||
255 | self.hs = fns.split() | 255 | self.hs = fns.split() |
256 | 256 | ||
257 | def eval(self, data): | 257 | def eval(self, data): |
258 | bbhands = bb.data.getVar('__BBHANDLERS', data) or [] | 258 | bbhands = data.getVar('__BBHANDLERS') or [] |
259 | for h in self.hs: | 259 | for h in self.hs: |
260 | bbhands.append(h) | 260 | bbhands.append(h) |
261 | bb.data.setVarFlag(h, "handler", 1, data) | 261 | data.setVarFlag(h, "handler", 1) |
262 | bb.data.setVar('__BBHANDLERS', bbhands, data) | 262 | data.setVar('__BBHANDLERS', bbhands) |
263 | 263 | ||
264 | class InheritNode(AstNode): | 264 | class InheritNode(AstNode): |
265 | def __init__(self, filename, lineno, classes): | 265 | def __init__(self, filename, lineno, classes): |
@@ -308,9 +308,9 @@ def handleInherit(statements, filename, lineno, m): | |||
308 | 308 | ||
309 | def finalize(fn, d, variant = None): | 309 | def finalize(fn, d, variant = None): |
310 | all_handlers = {} | 310 | all_handlers = {} |
311 | for var in bb.data.getVar('__BBHANDLERS', d) or []: | 311 | for var in d.getVar('__BBHANDLERS') or []: |
312 | # try to add the handler | 312 | # try to add the handler |
313 | handler = bb.data.getVar(var, d) | 313 | handler = d.getVar(var) |
314 | bb.event.register(var, handler) | 314 | bb.event.register(var, handler) |
315 | 315 | ||
316 | bb.event.fire(bb.event.RecipePreFinalise(fn), d) | 316 | bb.event.fire(bb.event.RecipePreFinalise(fn), d) |
@@ -318,12 +318,12 @@ def finalize(fn, d, variant = None): | |||
318 | bb.data.expandKeys(d) | 318 | bb.data.expandKeys(d) |
319 | bb.data.update_data(d) | 319 | bb.data.update_data(d) |
320 | code = [] | 320 | code = [] |
321 | for funcname in bb.data.getVar("__BBANONFUNCS", d) or []: | 321 | for funcname in d.getVar("__BBANONFUNCS") or []: |
322 | code.append("%s(d)" % funcname) | 322 | code.append("%s(d)" % funcname) |
323 | bb.utils.simple_exec("\n".join(code), {"d": d}) | 323 | bb.utils.simple_exec("\n".join(code), {"d": d}) |
324 | bb.data.update_data(d) | 324 | bb.data.update_data(d) |
325 | 325 | ||
326 | tasklist = bb.data.getVar('__BBTASKS', d) or [] | 326 | tasklist = d.getVar('__BBTASKS') or [] |
327 | bb.build.add_tasks(tasklist, d) | 327 | bb.build.add_tasks(tasklist, d) |
328 | 328 | ||
329 | bb.parse.siggen.finalise(fn, d, variant) | 329 | bb.parse.siggen.finalise(fn, d, variant) |
@@ -378,7 +378,7 @@ def multi_finalize(fn, d): | |||
378 | try: | 378 | try: |
379 | finalize(fn, d) | 379 | finalize(fn, d) |
380 | except bb.parse.SkipPackage as e: | 380 | except bb.parse.SkipPackage as e: |
381 | bb.data.setVar("__SKIPPED", e.args[0], d) | 381 | d.setVar("__SKIPPED", e.args[0]) |
382 | datastores = {"": safe_d} | 382 | datastores = {"": safe_d} |
383 | 383 | ||
384 | versions = (d.getVar("BBVERSIONS", True) or "").split() | 384 | versions = (d.getVar("BBVERSIONS", True) or "").split() |
@@ -421,7 +421,7 @@ def multi_finalize(fn, d): | |||
421 | try: | 421 | try: |
422 | finalize(fn, d) | 422 | finalize(fn, d) |
423 | except bb.parse.SkipPackage as e: | 423 | except bb.parse.SkipPackage as e: |
424 | bb.data.setVar("__SKIPPED", e.args[0], d) | 424 | d.setVar("__SKIPPED", e.args[0]) |
425 | 425 | ||
426 | _create_variants(datastores, versions, verfunc) | 426 | _create_variants(datastores, versions, verfunc) |
427 | 427 | ||
@@ -461,7 +461,7 @@ def multi_finalize(fn, d): | |||
461 | if not onlyfinalise or variant in onlyfinalise: | 461 | if not onlyfinalise or variant in onlyfinalise: |
462 | finalize(fn, variant_d, variant) | 462 | finalize(fn, variant_d, variant) |
463 | except bb.parse.SkipPackage as e: | 463 | except bb.parse.SkipPackage as e: |
464 | bb.data.setVar("__SKIPPED", e.args[0], variant_d) | 464 | variant_d.setVar("__SKIPPED", e.args[0]) |
465 | 465 | ||
466 | if len(datastores) > 1: | 466 | if len(datastores) > 1: |
467 | variants = filter(None, datastores.iterkeys()) | 467 | variants = filter(None, datastores.iterkeys()) |
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 8c1bd60abf..2d6e331a1d 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -159,7 +159,7 @@ def handle(fn, d, include): | |||
159 | return ast.multi_finalize(fn, d) | 159 | return ast.multi_finalize(fn, d) |
160 | 160 | ||
161 | if oldfile: | 161 | if oldfile: |
162 | bb.data.setVar("FILE", oldfile, d) | 162 | d.setVar("FILE", oldfile) |
163 | 163 | ||
164 | # we have parsed the bb class now | 164 | # we have parsed the bb class now |
165 | if ext == ".bbclass" or ext == ".inc": | 165 | if ext == ".bbclass" or ext == ".inc": |
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index e168d24b4c..6ae9d973e7 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
@@ -24,7 +24,7 @@ | |||
24 | # with this program; if not, write to the Free Software Foundation, Inc., | 24 | # with this program; if not, write to the Free Software Foundation, Inc., |
25 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 25 | # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
26 | 26 | ||
27 | import re, bb.data, os | 27 | import re, os |
28 | import logging | 28 | import logging |
29 | import bb.utils | 29 | import bb.utils |
30 | from bb.parse import ParseError, resolve_file, ast, logger | 30 | from bb.parse import ParseError, resolve_file, ast, logger |
@@ -36,9 +36,9 @@ __require_regexp__ = re.compile( r"require\s+(.+)" ) | |||
36 | __export_regexp__ = re.compile( r"export\s+(.+)" ) | 36 | __export_regexp__ = re.compile( r"export\s+(.+)" ) |
37 | 37 | ||
38 | def init(data): | 38 | def init(data): |
39 | topdir = bb.data.getVar('TOPDIR', data) | 39 | topdir = data.getVar('TOPDIR') |
40 | if not topdir: | 40 | if not topdir: |
41 | bb.data.setVar('TOPDIR', os.getcwd(), data) | 41 | data.setVar('TOPDIR', os.getcwd()) |
42 | 42 | ||
43 | 43 | ||
44 | def supports(fn, d): | 44 | def supports(fn, d): |
@@ -53,12 +53,12 @@ def include(oldfn, fn, data, error_out): | |||
53 | return None | 53 | return None |
54 | 54 | ||
55 | import bb | 55 | import bb |
56 | fn = bb.data.expand(fn, data) | 56 | fn = data.expand(fn) |
57 | oldfn = bb.data.expand(oldfn, data) | 57 | oldfn = data.expand(oldfn) |
58 | 58 | ||
59 | if not os.path.isabs(fn): | 59 | if not os.path.isabs(fn): |
60 | dname = os.path.dirname(oldfn) | 60 | dname = os.path.dirname(oldfn) |
61 | bbpath = "%s:%s" % (dname, bb.data.getVar("BBPATH", data, 1)) | 61 | bbpath = "%s:%s" % (dname, data.getVar("BBPATH", 1)) |
62 | abs_fn = bb.utils.which(bbpath, fn) | 62 | abs_fn = bb.utils.which(bbpath, fn) |
63 | if abs_fn: | 63 | if abs_fn: |
64 | fn = abs_fn | 64 | fn = abs_fn |
@@ -77,7 +77,7 @@ def handle(fn, data, include): | |||
77 | if include == 0: | 77 | if include == 0: |
78 | oldfile = None | 78 | oldfile = None |
79 | else: | 79 | else: |
80 | oldfile = bb.data.getVar('FILE', data) | 80 | oldfile = data.getVar('FILE') |
81 | 81 | ||
82 | abs_fn = resolve_file(fn, data) | 82 | abs_fn = resolve_file(fn, data) |
83 | f = open(abs_fn, 'r') | 83 | f = open(abs_fn, 'r') |
@@ -102,10 +102,10 @@ def handle(fn, data, include): | |||
102 | feeder(lineno, s, fn, statements) | 102 | feeder(lineno, s, fn, statements) |
103 | 103 | ||
104 | # DONE WITH PARSING... time to evaluate | 104 | # DONE WITH PARSING... time to evaluate |
105 | bb.data.setVar('FILE', abs_fn, data) | 105 | data.setVar('FILE', abs_fn) |
106 | statements.eval(data) | 106 | statements.eval(data) |
107 | if oldfile: | 107 | if oldfile: |
108 | bb.data.setVar('FILE', oldfile, data) | 108 | data.setVar('FILE', oldfile) |
109 | 109 | ||
110 | return data | 110 | return data |
111 | 111 | ||