summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-09 17:40:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-10 13:37:56 +0100
commitebaa3e3f5140d99ae1d42a69021edda0b6f379e1 (patch)
treed2c11ba8141a179e650467c265a9583b6253d01d /bitbake
parent20397f8d4b399e27268bb6f29be01739beb95b5f (diff)
downloadpoky-ebaa3e3f5140d99ae1d42a69021edda0b6f379e1.tar.gz
bitbake: tinfoil: When sending commands we need to process events
The server may be displaying useful information for the user through log messages so we should display anything that has been sent. Its either this or expecting every UI to implement this code around every command call which isn't good API. [YOCTO #14054] (Bitbake rev: 64ae9d7e2fad804dd9e12706c6d76b4b22f9586b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/tinfoil.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 2fb1bb7d27..763c329810 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -461,7 +461,16 @@ class Tinfoil:
461 commandline = [command] 461 commandline = [command]
462 if params: 462 if params:
463 commandline.extend(params) 463 commandline.extend(params)
464 result = self.server_connection.connection.runCommand(commandline) 464 try:
465 result = self.server_connection.connection.runCommand(commandline)
466 finally:
467 while True:
468 event = self.wait_event()
469 if not event:
470 break
471 if isinstance(event, logging.LogRecord):
472 if event.taskpid == 0 or event.levelno > logging.INFO:
473 self.logger.handle(event)
465 if result[1]: 474 if result[1]:
466 raise TinfoilCommandFailed(result[1]) 475 raise TinfoilCommandFailed(result[1])
467 return result[0] 476 return result[0]