[OE-core] [PATCH 6/8] sstatesig: Update to handle BB_HASHSERVE

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


Update the code to handle BB_HASHSERV, an autostarted bitbake internal hash
equivalency server suited to local developer usage.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/conf/bitbake.conf   | 2 +-
 meta/lib/oe/sstatesig.py | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 140f45b895b..ddcac09c5c7 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -885,7 +885,7 @@ BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH BBSERVER DL_DI
     WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \
     BB_WORKERCONTEXT BB_LIMITEDDEPS BB_UNIHASH extend_recipe_sysroot DEPLOY_DIR \
     SSTATE_HASHEQUIV_METHOD SSTATE_HASHEQUIV_SERVER SSTATE_HASHEQUIV_REPORT_TASKDATA \
-    SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR"
+    SSTATE_HASHEQUIV_OWNER CCACHE_TOP_DIR BB_HASHSERVE"
 BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
     SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \
     PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index f1a5af69c5e..3f926e3e515 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -271,9 +271,13 @@ class SignatureGeneratorOEEquivHash(bb.siggen.SignatureGeneratorUniHashMixIn, Si
 
     def init_rundepcheck(self, data):
         super().init_rundepcheck(data)
-        self.server = data.getVar('SSTATE_HASHEQUIV_SERVER')
+        autostart = data.getVar('BB_HASHSERVE')
+        if autostart:
+            self.server = "http://" + autostart
+        else:
+            self.server = data.getVar('SSTATE_HASHEQUIV_SERVER')
         if not self.server:
-            bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_SERVER to be set")
+            bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_SERVER or BB_HASHSERVE to be set")
         self.method = data.getVar('SSTATE_HASHEQUIV_METHOD')
         if not self.method:
             bb.fatal("OEEquivHash requires SSTATE_HASHEQUIV_METHOD to be set")
-- 
2.20.1



More information about the Openembedded-core mailing list