summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2025-02-26 17:50:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-03-06 11:16:46 +0000
commit12840e2d68d3e4553b28c8e5a00d012a96255c76 (patch)
tree85e9092adde2cab7147cd1a2f37eb522ec421144 /bitbake
parent543b1e6ffb3c7cef822f0782afe72623dc1bde02 (diff)
downloadpoky-12840e2d68d3e4553b28c8e5a00d012a96255c76.tar.gz
bitbake: lib/bb/cooker.py: produce an error when BB_HASHSERVE_UPSTREAM cannot be used due to missing python module
Previously if the websockets module was not installed bitbake would only print a warning and continue, resulting in a degraded user experience due to inability to use the configured sstate server. Let's consider that as fatal misconfiguration, so that users can address the issue properly and not wonder why builds are taking forever. (Bitbake rev: cfba2a9fca9dfa3b05ec9040fe0cb8143ac04af7) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 5b885cddd7..e21815daad 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -316,8 +316,14 @@ class BBCooker:
316 try: 316 try:
317 with hashserv.create_client(upstream) as client: 317 with hashserv.create_client(upstream) as client:
318 client.ping() 318 client.ping()
319 except (ConnectionError, ImportError) as e: 319 except ImportError as e:
320 bb.warn("BB_HASHSERVE_UPSTREAM is not valid, unable to connect hash equivalence server at '%s': %s" 320 bb.fatal(""""Unable to use hash equivalence server at '%s' due to missing or incorrect python module:
321%s
322Please install the needed module on the build host, or use an environment containing it (e.g a pip venv or OpenEmbedded's buildtools tarball).
323You can also remove the BB_HASHSERVE_UPSTREAM setting, but this may result in significantly longer build times as bitbake will be unable to reuse prebuilt sstate artefacts."""
324 % (upstream, repr(e)))
325 except ConnectionError as e:
326 bb.warn("Unable to connect to hash equivalence server at '%s', please correct or remove BB_HASHSERVE_UPSTREAM:\n%s"
321 % (upstream, repr(e))) 327 % (upstream, repr(e)))
322 upstream = None 328 upstream = None
323 329