summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-01 15:37:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-04 17:04:43 +0100
commit9b68f9606179bdbff544fef6dc3475a56d56b336 (patch)
tree039740b5e54278823a55fc854a9fca454831ff6c /bitbake
parent3dd31d3b29730fa1130645d76bb71914ac036335 (diff)
downloadpoky-9b68f9606179bdbff544fef6dc3475a56d56b336.tar.gz
bitbake: cooker: Ignore KeyErrors during shutdown
When parsing failures occur, trap KeyError to avoid these kinds of tracebacks (from a parsing error in meta-ti). bb.parse.ParseError: ParseError at /srv/pokybuild/yocto-worker/check-layer-nightly/build/meta-ti/meta-ti-bsp/recipes-kernel/linux/linux-ti-mainline_git.bb:6: Could not inherit file classes/${KERNEL_BASE_CLASS}.bbclass During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/srv/pokybuild/yocto-worker/check-layer-nightly/build/lib/bb/command.py", line 123, in runAsyncCommand self.cooker.updateCache() File "/srv/pokybuild/yocto-worker/check-layer-nightly/build/lib/bb/cooker.py", line 1639, in updateCache if not self.parser.parse_next(): File "/srv/pokybuild/yocto-worker/check-layer-nightly/build/lib/bb/cooker.py", line 2314, in parse_next self.shutdown(clean=False, eventmsg=str(exc)) File "/srv/pokybuild/yocto-worker/check-layer-nightly/build/lib/bb/cooker.py", line 2209, in shutdown read_results() File "/srv/pokybuild/yocto-worker/check-layer-nightly/build/lib/bb/cooker.py", line 2195, in read_results self.result_queue.get(timeout=0.25) File "/usr/lib/python3.10/multiprocessing/queues.py", line 122, in get return _ForkingPickler.loads(res) File "/srv/pokybuild/yocto-worker/check-layer-nightly/build/lib/bb/cache.py", line 338, in __setstate__ setattr(self, key, self._restore(state[key], pid)) File "/srv/pokybuild/yocto-worker/check-layer-nightly/build/lib/bb/cache.py", line 318, in _restore ret[dep] = map[mapnum] KeyError: 156 (Bitbake rev: 750c68ee7ee3f3d4518348e4c948243504880770) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 2eb64ef237..9e4000b63c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2195,6 +2195,11 @@ class CookerParser(object):
2195 self.result_queue.get(timeout=0.25) 2195 self.result_queue.get(timeout=0.25)
2196 except queue.Empty: 2196 except queue.Empty:
2197 break 2197 break
2198 except KeyError:
2199 # The restore state from SiggenRecipeInfo in cache.py can
2200 # fail here if this is an unclean shutdown since the state may have been
2201 # reset. Ignore key errors for that reason, we don't care.
2202 pass
2198 2203
2199 def sync_caches(): 2204 def sync_caches():
2200 for c in self.bb_caches.values(): 2205 for c in self.bb_caches.values():