aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2021-09-11 07:56:28 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-11 22:39:15 +0100
commit250fa17f1391ff1ee01ab9b51d2a4f9aa35c1d1e (patch)
tree7e579d107cad158698b42928abfa4df86475e696
parenteae6e947e37e18cded053814bd2a268b44fb25cd (diff)
downloadbitbake-250fa17f1391ff1ee01ab9b51d2a4f9aa35c1d1e.tar.gz
cooker: Allow upstream for local hash equivalence server
The hash equivalence server has had the option to support a read-only upstream server for some time now when launched as a standalone program, but there was no way to set the upstream when using a locally started server. Add a new variable called BB_HASHSERVE_UPSTREAM that can be used to specify an upstream server when a local hash equivalence server is used (e.g. BB_HASHSERVE is "auto") Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/cooker.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index db991702e..1f55d9ad7 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -389,7 +389,12 @@ class BBCooker:
if not self.hashserv:
dbfile = (self.data.getVar("PERSISTENT_DIR") or self.data.getVar("CACHE")) + "/hashserv.db"
self.hashservaddr = "unix://%s/hashserve.sock" % self.data.getVar("TOPDIR")
- self.hashserv = hashserv.create_server(self.hashservaddr, dbfile, sync=False)
+ self.hashserv = hashserv.create_server(
+ self.hashservaddr,
+ dbfile,
+ sync=False,
+ upstream=self.data.getVar("BB_HASHSERVE_UPSTREAM") or None,
+ )
self.hashserv.serve_as_process()
self.data.setVar("BB_HASHSERVE", self.hashservaddr)
self.databuilder.origdata.setVar("BB_HASHSERVE", self.hashservaddr)