summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-24 17:05:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-25 18:14:53 +0100
commitb9bbb5c7b7ea010a098e19c8da34fd5ea667a39f (patch)
treedb4630996fbebd794815d0cb9e0144ba4297ff7f /bitbake/lib/bb/server
parenta1c956ab4cae61ab3640d0455887645940e85ab6 (diff)
downloadpoky-b9bbb5c7b7ea010a098e19c8da34fd5ea667a39f.tar.gz
bitbake: main/server/process: Drop configuration object passing
The first thing the UIs do is update the server config from the UI. We can just rely upon that and start the server with a standard config, removing the need to pass the confusing configuration object around as well as configParams, which contains a similar copy of some of the data. This makes memory resident bitbake work the same way as the normal mode, removing the opportunity for some class of bugs. The xmlrpcinterface and server_timeout values are passed in at server startup time now and there no longer a second option in the configuration which is effective ignored once the server starts. (Bitbake rev: 783a03330802e83c525c55522e3ee2a933bded3a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/process.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 8f5abb32bf..03cdde04ee 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -394,9 +394,10 @@ class BitBakeServer(object):
394 start_log_format = '--- Starting bitbake server pid %s at %s ---' 394 start_log_format = '--- Starting bitbake server pid %s at %s ---'
395 start_log_datetime_format = '%Y-%m-%d %H:%M:%S.%f' 395 start_log_datetime_format = '%Y-%m-%d %H:%M:%S.%f'
396 396
397 def __init__(self, lock, sockname, configuration, featureset): 397 def __init__(self, lock, sockname, featureset, server_timeout, xmlrpcinterface):
398 398
399 self.configuration = configuration 399 self.server_timeout = server_timeout
400 self.xmlrpcinterface = xmlrpcinterface
400 self.featureset = featureset 401 self.featureset = featureset
401 self.sockname = sockname 402 self.sockname = sockname
402 self.bitbake_lock = lock 403 self.bitbake_lock = lock
@@ -476,11 +477,11 @@ class BitBakeServer(object):
476 os.chdir(cwd) 477 os.chdir(cwd)
477 sock.listen(1) 478 sock.listen(1)
478 479
479 server = ProcessServer(self.bitbake_lock, sock, self.sockname, self.configuration.server_timeout, self.configuration.xmlrpcinterface) 480 server = ProcessServer(self.bitbake_lock, sock, self.sockname, self.server_timeout, self.xmlrpcinterface)
480 os.close(self.readypipe) 481 os.close(self.readypipe)
481 writer = ConnectionWriter(self.readypipein) 482 writer = ConnectionWriter(self.readypipein)
482 try: 483 try:
483 self.cooker = bb.cooker.BBCooker(self.configuration, self.featureset, server.register_idle_function) 484 self.cooker = bb.cooker.BBCooker(self.featureset, server.register_idle_function)
484 except bb.BBHandledException: 485 except bb.BBHandledException:
485 return None 486 return None
486 writer.send("r") 487 writer.send("r")