From 250fa17f1391ff1ee01ab9b51d2a4f9aa35c1d1e Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Sat, 11 Sep 2021 07:56:28 -0500 Subject: 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 Signed-off-by: Richard Purdie --- lib/bb/cooker.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) -- cgit 1.2.3-korg