A couple of fixes related to the server rework
cover A couple of fixes related to the server rework
A couple of fixes for issues I've noticed when working with the newly reworked server code in bitbake.
Note: patch 2/2 also requires the revert I just sent to bitbake-devel in order to fully resolve the issue.
The following changes since commit a5bb13a5d7d7a668ca61da6b17884e3b05b95355:
python: don't include -tests with modules (2017-08-03 11:14:04 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/server-fixes
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=paule/server-fixes
Paul Eggleton (2):
bitbake.conf: whitelist BB_SERVER_TIMEOUT from config hash
devtool: fix handling of errors during task execution
meta/conf/bitbake.conf | 2 +- scripts/lib/devtool/standard.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
Signature · 1 line
2.9.4
PATCH 1/2 bitbake.conf: whitelist BB_SERVER_TIMEOUT from config hash
We don't need to reparse recipes just because BB_SERVER_TIMEOUT changed, so exclude it from the config hash.
--- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
@@ -850,7 +850,7 @@ BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \ PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \ GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \ HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD \ - BB_SETSCENE_ENFORCE BB_CMDLINE" + BB_SETSCENE_ENFORCE BB_CMDLINE BB_SERVER_TIMEOUT" BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \ lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \ file-checksums python func task export unexport noexec nostamp dirs cleandirs \
Signature · 1 line
2.9.4
PATCH 2/2 devtool: fix handling of errors during task execution
In reply to Paul Eggleton* If an error is logged while executing a task, we need to ensure we exit instead of assuming everything went OK.
* If we receive CookerExit, the server is shutting down and we need to stop waiting for events and probably exit (knotty does this). This will occur if an exception or bb.fatal() happens during an event handler.
This fixes a couple of issues highlighted when using devtool upgrade or modify on a non-supported recipe with intel-iot-refkit together with bitbake master, but I'd be very surprised if it were hard to reproduce in other scenarios.
--- scripts/lib/devtool/standard.py | 10 ++++++++++ 1 file changed, 10 insertions(+)
scripts/lib/devtool/standard.py +10 -0
@@ -498,18 +498,24 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil): 'logging.LogRecord', 'bb.command.CommandCompleted', 'bb.command.CommandFailed', + 'bb.cooker.CookerExit', 'bb.build.TaskStarted', 'bb.build.TaskSucceeded', 'bb.build.TaskFailed', 'bb.build.TaskFailedSilent']) def runtask(target, task): + error = False if tinfoil.build_file(target, task): while True: event = tinfoil.wait_event(0.25) if event: if isinstance(event, bb.command.CommandCompleted): break + elif isinstance(event, bb.cooker.CookerExit): + # The server is going away, so drop the connection + tinfoil.server_connection = None + break elif isinstance(event, bb.command.CommandFailed): raise DevtoolError('Task do_%s failed: %s' % (task, event.error)) elif isinstance(event, bb.build.TaskFailed):
@@ -519,7 +525,11 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil): elif isinstance(event, logging.LogRecord): if event.levelno <= logging.INFO: continue + if event.levelno >= logging.ERROR: + error = True logger.handle(event) + if error: + raise DevtoolError('An error occurred during do_%s, exiting' % task) # we need virtual:native:/path/to/recipe if it's a BBCLASSEXTEND fn = tinfoil.get_recipe_file(pn)
Signature · 1 line
2.9.4