diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-11-29 08:06:30 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:45 +0000 |
commit | 5bff22988c9b5cf8ada82f4488c6a74dc8e77e17 (patch) | |
tree | a58e3bf563c30ae1daba6a1f80bd76b0b4b4ac29 /bitbake/lib | |
parent | 8faec0b6720b942d420aa9f17d8a67555882b3e1 (diff) | |
download | poky-5bff22988c9b5cf8ada82f4488c6a74dc8e77e17.tar.gz |
cooker: pass back child exceptions to the server
(Bitbake rev: 0f68f8bcd0e0aa944f76f88a4a85c9bcc1e42bee)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 0ed70f9bd8..f5a7b02921 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1017,8 +1017,12 @@ class CookerParser(object): | |||
1017 | def worker(input, output, cfgdata): | 1017 | def worker(input, output, cfgdata): |
1018 | signal.signal(signal.SIGINT, signal.SIG_IGN) | 1018 | signal.signal(signal.SIGINT, signal.SIG_IGN) |
1019 | for filename, appends in iter(input.get, 'STOP'): | 1019 | for filename, appends in iter(input.get, 'STOP'): |
1020 | infos = bb.cache.Cache.parse(filename, appends, cfgdata) | 1020 | try: |
1021 | output.put(infos) | 1021 | infos = bb.cache.Cache.parse(filename, appends, cfgdata) |
1022 | except bb.parse.ParseError as exc: | ||
1023 | output.put(exc) | ||
1024 | else: | ||
1025 | output.put(infos) | ||
1022 | 1026 | ||
1023 | self.processes = [] | 1027 | self.processes = [] |
1024 | for i in xrange(self.num_processes): | 1028 | for i in xrange(self.num_processes): |
@@ -1070,10 +1074,12 @@ class CookerParser(object): | |||
1070 | try: | 1074 | try: |
1071 | if self.result_queue.empty() and self.fromcache: | 1075 | if self.result_queue.empty() and self.fromcache: |
1072 | filename, appends = self.fromcache.pop() | 1076 | filename, appends = self.fromcache.pop() |
1073 | _, infos = self.bb_cache.load(filename, appends, self.cfgdata) | 1077 | _, result = self.bb_cache.load(filename, appends, self.cfgdata) |
1074 | parsed = False | 1078 | parsed = False |
1075 | else: | 1079 | else: |
1076 | infos = self.result_queue.get() | 1080 | result = self.result_queue.get() |
1081 | if isinstance(result, Exception): | ||
1082 | raise result | ||
1077 | parsed = True | 1083 | parsed = True |
1078 | except KeyboardInterrupt: | 1084 | except KeyboardInterrupt: |
1079 | self.shutdown(clean=False) | 1085 | self.shutdown(clean=False) |
@@ -1086,9 +1092,9 @@ class CookerParser(object): | |||
1086 | self.parsed += 1 | 1092 | self.parsed += 1 |
1087 | else: | 1093 | else: |
1088 | self.cached += 1 | 1094 | self.cached += 1 |
1089 | self.virtuals += len(infos) | 1095 | self.virtuals += len(result) |
1090 | 1096 | ||
1091 | for virtualfn, info in infos: | 1097 | for virtualfn, info in result: |
1092 | if info.skipped: | 1098 | if info.skipped: |
1093 | self.skipped += 1 | 1099 | self.skipped += 1 |
1094 | else: | 1100 | else: |