summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 93707a250e..938b999b4f 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2067,8 +2067,9 @@ class Parser(multiprocessing.Process):
2067 2067
2068 jobid = None 2068 jobid = None
2069 try: 2069 try:
2070 jobid = self.jobid_queue.get(True, 0.5) 2070 # Have to wait for all parsers to have forked
2071 except (ValueError, OSError): 2071 jobid = self.jobid_queue.get(True, 5)
2072 except (ValueError, OSError, queue.Empty):
2072 havejobs = False 2073 havejobs = False
2073 2074
2074 if jobid is not None: 2075 if jobid is not None:
@@ -2171,9 +2172,6 @@ class CookerParser(object):
2171 self.parser_quit = multiprocessing.Event() 2172 self.parser_quit = multiprocessing.Event()
2172 self.result_queue = multiprocessing.Queue() 2173 self.result_queue = multiprocessing.Queue()
2173 2174
2174 for jobid in range(len(self.willparse)):
2175 self.toparse_queue.put(jobid)
2176
2177 # Have to pass in willparse at fork time so all parsing processes have the unpickleable data 2175 # Have to pass in willparse at fork time so all parsing processes have the unpickleable data
2178 # then access it by index from the parse queue. 2176 # then access it by index from the parse queue.
2179 for i in range(0, self.num_processes): 2177 for i in range(0, self.num_processes):
@@ -2182,6 +2180,8 @@ class CookerParser(object):
2182 self.process_names.append(parser.name) 2180 self.process_names.append(parser.name)
2183 self.processes.append(parser) 2181 self.processes.append(parser)
2184 2182
2183 for jobid in range(len(self.willparse)):
2184 self.toparse_queue.put(jobid)
2185 self.toparse_queue.close() 2185 self.toparse_queue.close()
2186 2186
2187 self.results = itertools.chain(self.results, self.parse_generator()) 2187 self.results = itertools.chain(self.results, self.parse_generator())
@@ -2292,7 +2292,7 @@ class CookerParser(object):
2292 yield result 2292 yield result
2293 2293
2294 if not (self.parsed >= self.toparse): 2294 if not (self.parsed >= self.toparse):
2295 raise bb.parse.ParseError("Not all recipes parsed, parser thread killed/died? Exiting.", None) 2295 raise bb.parse.ParseError("Not all recipes parsed, parser thread killed/died? (%s %s of %s) Exiting." % (len(self.processes), self.parsed, self.toparse), None)
2296 2296
2297 2297
2298 def parse_next(self): 2298 def parse_next(self):