diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2021-09-16 07:19:36 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-16 22:17:07 +0100 |
commit | c225638a1bef06aa7b3c07e37102d550afc0107e (patch) | |
tree | 5a8a700042cfb7e28b1a45b783848797c18b0900 | |
parent | 27d5b55bb33c319ca595c192c910eac91a5d9428 (diff) | |
download | bitbake-c225638a1bef06aa7b3c07e37102d550afc0107e.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>
(cherry picked from commit 250fa17f1391ff1ee01ab9b51d2a4f9aa35c1d1e)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/cooker.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 39e10e613..f2beea2d3 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.process = multiprocessing.Process(target=self.hashserv.serve_forever) self.hashserv.process.start() self.data.setVar("BB_HASHSERVE", self.hashservaddr) |