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:48 +0100 |
commit | 0004786a1592bc509f097f76ccc5ede7bf987c77 (patch) | |
tree | 21985b6bd58b64857268c90444d24c2972dd657a /bitbake | |
parent | 97afd55a887104355dc975f8bb1684dc82d3704a (diff) | |
download | poky-0004786a1592bc509f097f76ccc5ede7bf987c77.tar.gz |
bitbake: 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")
(Bitbake rev: c225638a1bef06aa7b3c07e37102d550afc0107e)
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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 39e10e6133..f2beea2d3c 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -389,7 +389,12 @@ class BBCooker: | |||
389 | if not self.hashserv: | 389 | if not self.hashserv: |
390 | dbfile = (self.data.getVar("PERSISTENT_DIR") or self.data.getVar("CACHE")) + "/hashserv.db" | 390 | dbfile = (self.data.getVar("PERSISTENT_DIR") or self.data.getVar("CACHE")) + "/hashserv.db" |
391 | self.hashservaddr = "unix://%s/hashserve.sock" % self.data.getVar("TOPDIR") | 391 | self.hashservaddr = "unix://%s/hashserve.sock" % self.data.getVar("TOPDIR") |
392 | self.hashserv = hashserv.create_server(self.hashservaddr, dbfile, sync=False) | 392 | self.hashserv = hashserv.create_server( |
393 | self.hashservaddr, | ||
394 | dbfile, | ||
395 | sync=False, | ||
396 | upstream=self.data.getVar("BB_HASHSERVE_UPSTREAM") or None, | ||
397 | ) | ||
393 | self.hashserv.process = multiprocessing.Process(target=self.hashserv.serve_forever) | 398 | self.hashserv.process = multiprocessing.Process(target=self.hashserv.serve_forever) |
394 | self.hashserv.process.start() | 399 | self.hashserv.process.start() |
395 | self.data.setVar("BB_HASHSERVE", self.hashservaddr) | 400 | self.data.setVar("BB_HASHSERVE", self.hashservaddr) |