diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-07-24 09:13:55 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-06 11:21:31 +0100 |
commit | ca04aaf7b51e3ee2bb04da970d5f20f2c9982cb8 (patch) | |
tree | ee5fe5d5e780cd965bbe7f9a0d25d91d280b1834 /bitbake/bin | |
parent | d9aafb85072bef3b5baa54408969d54a8425a111 (diff) | |
download | poky-ca04aaf7b51e3ee2bb04da970d5f20f2c9982cb8.tar.gz |
bitbake: 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.
(Bitbake rev: a4fa8f1bd88995ae60e10430316fbed63d478587)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-x | bitbake/bin/bitbake-hashserv | 4 | ||||
-rwxr-xr-x | bitbake/bin/bitbake-worker | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-hashserv b/bitbake/bin/bitbake-hashserv index 848a0ca39f..6c911c098a 100755 --- a/bitbake/bin/bitbake-hashserv +++ b/bitbake/bin/bitbake-hashserv | |||
@@ -41,9 +41,7 @@ def main(): | |||
41 | console.setLevel(level) | 41 | console.setLevel(level) |
42 | logger.addHandler(console) | 42 | logger.addHandler(console) |
43 | 43 | ||
44 | db = sqlite3.connect(args.database) | 44 | server = hashserv.create_server((args.address, args.port), args.database, args.prefix) |
45 | |||
46 | server = hashserv.create_server((args.address, args.port), db, args.prefix) | ||
47 | server.serve_forever() | 45 | server.serve_forever() |
48 | return 0 | 46 | return 0 |
49 | 47 | ||
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index 3e502d5ca9..96369199f2 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker | |||
@@ -418,6 +418,7 @@ class BitbakeWorker(object): | |||
418 | bb.msg.loggerDefaultDomains = self.workerdata["logdefaultdomain"] | 418 | bb.msg.loggerDefaultDomains = self.workerdata["logdefaultdomain"] |
419 | for mc in self.databuilder.mcdata: | 419 | for mc in self.databuilder.mcdata: |
420 | self.databuilder.mcdata[mc].setVar("PRSERV_HOST", self.workerdata["prhost"]) | 420 | self.databuilder.mcdata[mc].setVar("PRSERV_HOST", self.workerdata["prhost"]) |
421 | self.databuilder.mcdata[mc].setVar("BB_HASHSERVE", self.workerdata["hashservport"]) | ||
421 | 422 | ||
422 | def handle_newtaskhashes(self, data): | 423 | def handle_newtaskhashes(self, data): |
423 | self.workerdata["newhashes"] = pickle.loads(data) | 424 | self.workerdata["newhashes"] = pickle.loads(data) |