aboutsummaryrefslogtreecommitdiffstats
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
import progressbar
import signal
import bb.msg
+import time
import fcntl
import struct
import copy
@@ -216,6 +217,10 @@ def main(server, eventHandler, tf = TerminalFilter):
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"])
consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"])
+ if sys.stdin.isatty() and sys.stdout.isatty():
+ log_exec_tty = True
+ else:
+ log_exec_tty = False
helper = uihelper.BBUIHelper()
@@ -271,6 +276,20 @@ def main(server, eventHandler, tf = TerminalFilter):
if not main.shutdown:
main.shutdown = 1
+ if isinstance(event, bb.event.LogExecTTY):
+ if log_exec_tty:
+ tries = event.retries
+ while tries:
+ print "Trying to run: %s" % event.prog
+ if os.system(event.prog) == 0:
+ break
+ time.sleep(event.sleep_delay)
+ tries -= 1
+ if tries:
+ continue
+ logger.warn(event.msg)
+ continue
+
if isinstance(event, logging.LogRecord):
if event.levelno >= format.ERROR:
errors = errors + 1