summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 194595ce8b..2b92744998 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -388,12 +388,22 @@ class BBCooker:
388 # Create a new hash server bound to a unix domain socket 388 # Create a new hash server bound to a unix domain socket
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 upstream = self.data.getVar("BB_HASHSERVE_UPSTREAM") or None
392 if upstream:
393 import socket
394 try:
395 sock = socket.create_connection(upstream.split(":"), 5)
396 sock.close()
397 except socket.error as e:
398 bb.warn("BB_HASHSERVE_UPSTREAM is not valid, unable to connect hash equivalence server at '%s': %s"
399 % (upstream, repr(e)))
400
391 self.hashservaddr = "unix://%s/hashserve.sock" % self.data.getVar("TOPDIR") 401 self.hashservaddr = "unix://%s/hashserve.sock" % self.data.getVar("TOPDIR")
392 self.hashserv = hashserv.create_server( 402 self.hashserv = hashserv.create_server(
393 self.hashservaddr, 403 self.hashservaddr,
394 dbfile, 404 dbfile,
395 sync=False, 405 sync=False,
396 upstream=self.data.getVar("BB_HASHSERVE_UPSTREAM") or None, 406 upstream=upstream,
397 ) 407 )
398 self.hashserv.serve_as_process() 408 self.hashserv.serve_as_process()
399 self.data.setVar("BB_HASHSERVE", self.hashservaddr) 409 self.data.setVar("BB_HASHSERVE", self.hashservaddr)