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>2021-12-02 14:37:53 +0000
commit1db38c5a18952d949cd24ef354a1fee0aa1b63a0 (patch)
tree3d35dd242bce90ac79acac441294f949a9cfae53 /bitbake
parentb409a428c1e8c7d91b039682355fee8145d31a4f (diff)
downloadpoky-1db38c5a18952d949cd24ef354a1fee0aa1b63a0.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: f20da5247dea524e837c5b6fdeccc79cbafedf90) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 64ae9d7e2fad804dd9e12706c6d76b4b22f9586b) Signed-off-by: Steve Sakoman <steve@sakoman.com> 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 8c9b6b8ca5..ae69038952 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -465,7 +465,16 @@ class Tinfoil:
465 commandline = [command] 465 commandline = [command]
466 if params: 466 if params:
467 commandline.extend(params) 467 commandline.extend(params)
468 result = self.server_connection.connection.runCommand(commandline) 468 try:
469 result = self.server_connection.connection.runCommand(commandline)
470 finally:
471 while True:
472 event = self.wait_event()
473 if not event:
474 break
475 if isinstance(event, logging.LogRecord):
476 if event.taskpid == 0 or event.levelno > logging.INFO:
477 self.logger.handle(event)
469 if result[1]: 478 if result[1]:
470 raise TinfoilCommandFailed(result[1]) 479 raise TinfoilCommandFailed(result[1])
471 return result[0] 480 return result[0]