* [PATCH] BBHandler: Ensure parser state engine is correctly reset for new parsing
@ 2012-12-07 13:10 Richard Purdie
2012-12-08 0:29 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2012-12-07 13:10 UTC (permalink / raw)
To: bitbake-devel
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@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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] BBHandler: Ensure parser state engine is correctly reset for new parsing
2012-12-07 13:10 [PATCH] BBHandler: Ensure parser state engine is correctly reset for new parsing Richard Purdie
@ 2012-12-08 0:29 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2012-12-08 0:29 UTC (permalink / raw)
To: bitbake-devel
On Fri, 2012-12-07 at 13:10 +0000, Richard Purdie wrote:
> 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@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)
This patch doesn't work. To cut a long story short, "classes" is getting
cached inside the ast statement cache and shouldn't be. This is likely
the source of the problems.
Trying to fix that leads to a voyage of discovery of other breakage :(
Its likely going to end up with the EXPORT_FUNCTION implementation
needing rewriting, or at least how/where its getting its class lists
from.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-08 0:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-07 13:10 [PATCH] BBHandler: Ensure parser state engine is correctly reset for new parsing Richard Purdie
2012-12-08 0:29 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.