summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb/ui/knotty.py
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2020-12-08 00:38:17 +0300
committerJason M. Bills <jason.m.bills@linux.intel.com>2020-12-08 00:38:17 +0300
commit8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch)
tree281032f7ec07c41589aa094bd165cc2a98f2d3a7 /poky/bitbake/lib/bb/ui/knotty.py
parentc16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff)
parent5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff)
downloadopenbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'poky/bitbake/lib/bb/ui/knotty.py')
-rw-r--r--poky/bitbake/lib/bb/ui/knotty.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/poky/bitbake/lib/bb/ui/knotty.py b/poky/bitbake/lib/bb/ui/knotty.py
index 87e873d64..a91e4fd15 100644
--- a/poky/bitbake/lib/bb/ui/knotty.py
+++ b/poky/bitbake/lib/bb/ui/knotty.py
@@ -144,7 +144,7 @@ class TerminalFilter(object):
pass
if not cr:
try:
- cr = (env['LINES'], env['COLUMNS'])
+ cr = (os.environ['LINES'], os.environ['COLUMNS'])
except:
cr = (25, 80)
return cr
@@ -380,14 +380,27 @@ _evt_list = [ "bb.runqueue.runQueueExitWait", "bb.event.LogExecTTY", "logging.Lo
"bb.event.BuildBase", "bb.build.TaskStarted", "bb.build.TaskSucceeded", "bb.build.TaskFailedSilent",
"bb.build.TaskProgress", "bb.event.ProcessStarted", "bb.event.ProcessProgress", "bb.event.ProcessFinished"]
+def drain_events_errorhandling(eventHandler):
+ # We don't have logging setup, we do need to show any events we see before exiting
+ event = True
+ logger = bb.msg.logger_create('bitbake', sys.stdout)
+ while event:
+ event = eventHandler.waitEvent(0)
+ if isinstance(event, logging.LogRecord):
+ logger.handle(event)
+
def main(server, eventHandler, params, tf = TerminalFilter):
- if not params.observe_only:
- params.updateToServer(server, os.environ.copy())
+ try:
+ if not params.observe_only:
+ params.updateToServer(server, os.environ.copy())
- includelogs, loglines, consolelogfile, logconfigfile = _log_settings_from_server(server, params.observe_only)
+ includelogs, loglines, consolelogfile, logconfigfile = _log_settings_from_server(server, params.observe_only)
- loglevel, _ = bb.msg.constructLogOptions()
+ loglevel, _ = bb.msg.constructLogOptions()
+ except bb.BBHandledException:
+ drain_events_errorhandling(eventHandler)
+ return 1
if params.options.quiet == 0:
console_loglevel = loglevel