From 5bff22988c9b5cf8ada82f4488c6a74dc8e77e17 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Mon, 29 Nov 2010 08:06:30 -0700 Subject: cooker: pass back child exceptions to the server (Bitbake rev: 0f68f8bcd0e0aa944f76f88a4a85c9bcc1e42bee) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'bitbake/lib/bb') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 0ed70f9bd..f5a7b0292 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -1017,8 +1017,12 @@ class CookerParser(object): def worker(input, output, cfgdata): signal.signal(signal.SIGINT, signal.SIG_IGN) for filename, appends in iter(input.get, 'STOP'): - infos = bb.cache.Cache.parse(filename, appends, cfgdata) - output.put(infos) + try: + infos = bb.cache.Cache.parse(filename, appends, cfgdata) + except bb.parse.ParseError as exc: + output.put(exc) + else: + output.put(infos) self.processes = [] for i in xrange(self.num_processes): @@ -1070,10 +1074,12 @@ class CookerParser(object): try: if self.result_queue.empty() and self.fromcache: filename, appends = self.fromcache.pop() - _, infos = self.bb_cache.load(filename, appends, self.cfgdata) + _, result = self.bb_cache.load(filename, appends, self.cfgdata) parsed = False else: - infos = self.result_queue.get() + result = self.result_queue.get() + if isinstance(result, Exception): + raise result parsed = True except KeyboardInterrupt: self.shutdown(clean=False) @@ -1086,9 +1092,9 @@ class CookerParser(object): self.parsed += 1 else: self.cached += 1 - self.virtuals += len(infos) + self.virtuals += len(result) - for virtualfn, info in infos: + for virtualfn, info in result: if info.skipped: self.skipped += 1 else: -- cgit v1.2.3