aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-24 09:13:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-06 11:21:07 +0100
commita4fa8f1bd88995ae60e10430316fbed63d478587 (patch)
tree1e600d955490012da58985d0bdf06c5371781db7 /bin
parent6a901bb904a97ca90d88be2c6901d3d32346282f (diff)
downloadbitbake-a4fa8f1bd88995ae60e10430316fbed63d478587.tar.gz
cooker/hashserv: Allow autostarting of a local hash server using BB_HASHSERVE
Its useful, particularly in the local developer model of usage, for bitbake to start and stop a hash equivalence server on local port, rather than relying on one being started by the user before the build. The new BB_HASHSERVE variable supports this. The database handling is moved internally into the hashserv code so that different threads/processes can be used for the server without errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bitbake-hashserv4
-rwxr-xr-xbin/bitbake-worker1
2 files changed, 2 insertions, 3 deletions
diff --git a/bin/bitbake-hashserv b/bin/bitbake-hashserv
index 848a0ca39..6c911c098 100755
--- a/bin/bitbake-hashserv
+++ b/bin/bitbake-hashserv
@@ -41,9 +41,7 @@ def main():
console.setLevel(level)
logger.addHandler(console)
- db = sqlite3.connect(args.database)
-
- server = hashserv.create_server((args.address, args.port), db, args.prefix)
+ server = hashserv.create_server((args.address, args.port), args.database, args.prefix)
server.serve_forever()
return 0
diff --git a/bin/bitbake-worker b/bin/bitbake-worker
index 3e502d5ca..96369199f 100755
--- a/bin/bitbake-worker
+++ b/bin/bitbake-worker
@@ -418,6 +418,7 @@ class BitbakeWorker(object):
bb.msg.loggerDefaultDomains = self.workerdata["logdefaultdomain"]
for mc in self.databuilder.mcdata:
self.databuilder.mcdata[mc].setVar("PRSERV_HOST", self.workerdata["prhost"])
+ self.databuilder.mcdata[mc].setVar("BB_HASHSERVE", self.workerdata["hashservport"])
def handle_newtaskhashes(self, data):
self.workerdata["newhashes"] = pickle.loads(data)