summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-23 10:47:10 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-24 10:34:52 +0100
commit8bef99d3c85f48ff409eaebb964b1c45b203bdcf (patch)
tree45663874832e85f9c80d6df9d521357a4e5dcb77 /bitbake/lib/bb/cooker.py
parent3c5b9cf15f2034b704f571a75ad102cc57f9a3b6 (diff)
downloadpoky-8bef99d3c85f48ff409eaebb964b1c45b203bdcf.tar.gz
bitbake: methodpool: Retire it, remove global method scope
Having a global method scope confuses users and with the introduction of parallel parsing, its not even possible to correctly detect conflicting functions. Rather than try and fix that, its simpler to retire the global method scope and restrict functions to those locations they're defined within. This is more what users actually expect too. If we remove the global function scope, the need for methodpool is reduced to the point we may as well retire it. There is some small loss of caching of parsed functions but timing measurements so the impact to be neglibile in the overall parsing time. (Bitbake rev: 4d50690489ee8dc329a9b0c7bc4ceb29b71e95e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index daf37ebd45..eed489f5d4 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1454,6 +1454,7 @@ class Parser(multiprocessing.Process):
1454 self.quit = quit 1454 self.quit = quit
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 1458
1458 def run(self): 1459 def run(self):
1459 if self.init: 1460 if self.init:
@@ -1488,6 +1489,7 @@ class Parser(multiprocessing.Process):
1488 1489
1489 def parse(self, filename, appends, caches_array): 1490 def parse(self, filename, appends, caches_array):
1490 try: 1491 try:
1492 bb.utils._context = self.context.copy()
1491 return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array) 1493 return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array)
1492 except Exception as exc: 1494 except Exception as exc:
1493 tb = sys.exc_info()[2] 1495 tb = sys.exc_info()[2]