summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-10 12:33:27 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-11 17:58:33 +0100
commit560fa9ad8dd46f23cff7a2e88a3492c363314b29 (patch)
tree546aaaea213e9b82587747ccd9535226de27f6da /bitbake/lib/bb/cooker.py
parentd734ab491a30078d43dee5440c03acce2d251425 (diff)
downloadpoky-560fa9ad8dd46f23cff7a2e88a3492c363314b29.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: bbb4fa427739912ff3b87379bf629066f6662458) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Tested-by: Denys Dmytriyenko <denys@ti.com>
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 2c54209f89..4d6cf81a3c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1606,6 +1606,7 @@ class Parser(multiprocessing.Process):
1606 self.quit = quit 1606 self.quit = quit
1607 self.init = init 1607 self.init = init
1608 multiprocessing.Process.__init__(self) 1608 multiprocessing.Process.__init__(self)
1609 self.context = bb.utils._context.copy()
1609 1610
1610 def run(self): 1611 def run(self):
1611 if self.init: 1612 if self.init:
@@ -1640,6 +1641,7 @@ class Parser(multiprocessing.Process):
1640 1641
1641 def parse(self, filename, appends, caches_array): 1642 def parse(self, filename, appends, caches_array):
1642 try: 1643 try:
1644 bb.utils._context = self.context.copy()
1643 return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array) 1645 return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array)
1644 except Exception as exc: 1646 except Exception as exc:
1645 tb = sys.exc_info()[2] 1647 tb = sys.exc_info()[2]