[OE-core] [PATCH 4/8] sstatesig: Add debug for incorrect hash server settings

Richard Purdie richard.purdie at linuxfoundation.org
Fri Aug 2 15:22:16 UTC 2019


If the hash server settings are incorrect, show the user useful
error messages instead of tracebacks.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/sstatesig.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 35d48f328de..eff5adfc602 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -272,7 +272,11 @@ class SignatureGeneratorOEEquivHash(bb.siggen.SignatureGeneratorUniHashMixIn, Si
     def init_rundepcheck(self, data):
         super().init_rundepcheck(data)
         self.server = data.getVar('SSTATE_HASHEQUIV_SERVER')
+        if not self.server:
+            bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_SERVER to be set")
         self.method = data.getVar('SSTATE_HASHEQUIV_METHOD')
+        if not self.method:
+            bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set")
         self.unihashes = bb.persist_data.persist('SSTATESIG_UNIHASH_CACHE_v1_' + self.method.replace('.', '_'), data)
 
 
-- 
2.20.1



More information about the Openembedded-core mailing list