[bitbake-devel] [PATCH] BBHandler: Ensure parser state engine is correctly reset for new parsing
Richard Purdie
richard.purdie at linuxfoundation.org
Fri Dec 7 13:10:51 UTC 2012
The classes variable in particular could be in an odd state if parsing of a
previous recipe had abruptly ended.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 2e0647b..c4e579d 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -107,14 +107,15 @@ def get_statements(filename, absolute_filename, base_name):
return statements
def handle(fn, d, include):
- global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__
+ global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__, __inpython__, classes
__body__ = []
__infunc__ = ""
__classname__ = ""
__residue__ = []
-
+ __inpython__ = False
if include == 0:
+ classes = [ None, ]
logger.debug(2, "BB %s: handle(data)", fn)
else:
logger.debug(2, "BB %s: handle(data, include)", fn)
More information about the bitbake-devel
mailing list