summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/knotty.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/knotty.py')
-rw-r--r--bitbake/lib/bb/ui/knotty.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 858cacfe55..d81ad5d540 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -27,6 +27,7 @@ import logging
27import progressbar 27import progressbar
28import signal 28import signal
29import bb.msg 29import bb.msg
30import time
30import fcntl 31import fcntl
31import struct 32import struct
32import copy 33import copy
@@ -216,6 +217,10 @@ def main(server, eventHandler, tf = TerminalFilter):
216 includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"]) 217 includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
217 loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"]) 218 loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
218 consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"]) 219 consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"])
220 if sys.stdin.isatty() and sys.stdout.isatty():
221 log_exec_tty = True
222 else:
223 log_exec_tty = False
219 224
220 helper = uihelper.BBUIHelper() 225 helper = uihelper.BBUIHelper()
221 226
@@ -271,6 +276,20 @@ def main(server, eventHandler, tf = TerminalFilter):
271 if not main.shutdown: 276 if not main.shutdown:
272 main.shutdown = 1 277 main.shutdown = 1
273 278
279 if isinstance(event, bb.event.LogExecTTY):
280 if log_exec_tty:
281 tries = event.retries
282 while tries:
283 print "Trying to run: %s" % event.prog
284 if os.system(event.prog) == 0:
285 break
286 time.sleep(event.sleep_delay)
287 tries -= 1
288 if tries:
289 continue
290 logger.warn(event.msg)
291 continue
292
274 if isinstance(event, logging.LogRecord): 293 if isinstance(event, logging.LogRecord):
275 if event.levelno >= format.ERROR: 294 if event.levelno >= format.ERROR:
276 errors = errors + 1 295 errors = errors + 1