diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-24 17:05:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-25 18:14:53 +0100 |
commit | b9bbb5c7b7ea010a098e19c8da34fd5ea667a39f (patch) | |
tree | db4630996fbebd794815d0cb9e0144ba4297ff7f /bitbake/lib/bb/main.py | |
parent | a1c956ab4cae61ab3640d0455887645940e85ab6 (diff) | |
download | poky-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/main.py')
-rwxr-xr-x | bitbake/lib/bb/main.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py index e483cce1ae..7990195eac 100755 --- a/bitbake/lib/bb/main.py +++ b/bitbake/lib/bb/main.py | |||
@@ -344,8 +344,6 @@ def bitbake_main(configParams, configuration): | |||
344 | except: | 344 | except: |
345 | pass | 345 | pass |
346 | 346 | ||
347 | configuration.setConfigParameters(configParams) | ||
348 | |||
349 | if configParams.server_only and configParams.remote_server: | 347 | if configParams.server_only and configParams.remote_server: |
350 | raise BBMainException("FATAL: The '--server-only' option conflicts with %s.\n" % | 348 | raise BBMainException("FATAL: The '--server-only' option conflicts with %s.\n" % |
351 | ("the BBSERVER environment variable" if "BBSERVER" in os.environ \ | 349 | ("the BBSERVER environment variable" if "BBSERVER" in os.environ \ |
@@ -363,7 +361,7 @@ def bitbake_main(configParams, configuration): | |||
363 | bb.msg.init_msgconfig(configParams.verbose, configParams.debug, | 361 | bb.msg.init_msgconfig(configParams.verbose, configParams.debug, |
364 | configParams.debug_domains) | 362 | configParams.debug_domains) |
365 | 363 | ||
366 | server_connection, ui_module = setup_bitbake(configParams, configuration) | 364 | server_connection, ui_module = setup_bitbake(configParams) |
367 | # No server connection | 365 | # No server connection |
368 | if server_connection is None: | 366 | if server_connection is None: |
369 | if configParams.status_only: | 367 | if configParams.status_only: |
@@ -390,7 +388,7 @@ def bitbake_main(configParams, configuration): | |||
390 | 388 | ||
391 | return 1 | 389 | return 1 |
392 | 390 | ||
393 | def setup_bitbake(configParams, configuration, extrafeatures=None): | 391 | def setup_bitbake(configParams, extrafeatures=None): |
394 | # Ensure logging messages get sent to the UI as events | 392 | # Ensure logging messages get sent to the UI as events |
395 | handler = bb.event.LogHandler() | 393 | handler = bb.event.LogHandler() |
396 | if not configParams.status_only: | 394 | if not configParams.status_only: |
@@ -431,11 +429,11 @@ def setup_bitbake(configParams, configuration, extrafeatures=None): | |||
431 | logger.info("bitbake server is not running.") | 429 | logger.info("bitbake server is not running.") |
432 | lock.close() | 430 | lock.close() |
433 | return None, None | 431 | return None, None |
434 | # we start a server with a given configuration | 432 | # we start a server with a given featureset |
435 | logger.info("Starting bitbake server...") | 433 | logger.info("Starting bitbake server...") |
436 | # Clear the event queue since we already displayed messages | 434 | # Clear the event queue since we already displayed messages |
437 | bb.event.ui_queue = [] | 435 | bb.event.ui_queue = [] |
438 | server = bb.server.process.BitBakeServer(lock, sockname, configuration, featureset) | 436 | server = bb.server.process.BitBakeServer(lock, sockname, featureset, configParams.server_timeout, configParams.xmlrpcinterface) |
439 | 437 | ||
440 | else: | 438 | else: |
441 | logger.info("Reconnecting to bitbake server...") | 439 | logger.info("Reconnecting to bitbake server...") |