diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-23 10:48:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-24 10:34:52 +0100 |
commit | 0130b4c2691ddee3867df9de5a2852b2bcf1f617 (patch) | |
tree | bfbefbcf873869752d132877104c656851895a86 /bitbake/lib | |
parent | 8bef99d3c85f48ff409eaebb964b1c45b203bdcf (diff) | |
download | poky-0130b4c2691ddee3867df9de5a2852b2bcf1f617.tar.gz |
bitbake: cooker.py: Remove global scope class event handlers
Its confusing when an event handler in for example a bbclass receives
events for a recipe which doesn't use the class. This is due to the
class event handlers having confusing scope. Worse, the issue is not
deterministic and the events a handler will see depends on the parse
order.
To avoid these issues, remove the class event handler global scope
and only have class handlers recieve events for recipes using the
class.
(Bitbake rev: 7fb95f3d133e440d463d2faa7151c731f8e1ae96)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index eed489f5d4..41f70ab95a 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1455,6 +1455,7 @@ class Parser(multiprocessing.Process): | |||
1455 | self.init = init | 1455 | self.init = init |
1456 | multiprocessing.Process.__init__(self) | 1456 | multiprocessing.Process.__init__(self) |
1457 | self.context = bb.utils._context.copy() | 1457 | self.context = bb.utils._context.copy() |
1458 | self.handlers = bb.event._handlers.copy() | ||
1458 | 1459 | ||
1459 | def run(self): | 1460 | def run(self): |
1460 | if self.init: | 1461 | if self.init: |
@@ -1490,6 +1491,7 @@ class Parser(multiprocessing.Process): | |||
1490 | def parse(self, filename, appends, caches_array): | 1491 | def parse(self, filename, appends, caches_array): |
1491 | try: | 1492 | try: |
1492 | bb.utils._context = self.context.copy() | 1493 | bb.utils._context = self.context.copy() |
1494 | bb.event._handlers = self.handlers.copy() | ||
1493 | return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array) | 1495 | return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array) |
1494 | except Exception as exc: | 1496 | except Exception as exc: |
1495 | tb = sys.exc_info()[2] | 1497 | tb = sys.exc_info()[2] |