Patchwork [bitbake-devel,1/1] bitbake: knotty: Clear footer before outputting to stderr

login
register
mail settings
Submitter Peter Kjellerstedt
Date April 8, 2014, 2:09 p.m.
Message ID <ab27b6a57259d7b4d3a55d1b6e662b3a2679ceb5.1396966113.git.pkj@axis.com>
Download mbox | patch
Permalink /patch/70289/
State New
Headers show

Comments

Peter Kjellerstedt - April 8, 2014, 2:09 p.m.
With the recent change to split the log output to stdout and stderr,
error messages that appeared while the footer was printed got all
messed up. This was because the messages to stderr was output _after_
the footer, then clearFooter() tried to remove the footer but removed
the error message and parts of the footer.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 bitbake/lib/bb/ui/knotty.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 80a4b32..41f1ba8 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -133,7 +133,7 @@  class TerminalFilter(object):
                 cr = (25, 80)
         return cr[1]
 
-    def __init__(self, main, helper, console, format):
+    def __init__(self, main, helper, console, errconsole, format):
         self.main = main
         self.helper = helper
         self.cuu = None
@@ -174,6 +174,7 @@  class TerminalFilter(object):
         except:
             self.cuu = None
         console.addFilter(InteractConsoleLogFilter(self, format))
+        errconsole.addFilter(InteractConsoleLogFilter(self, format))
 
     def clearFooter(self):
         if self.footer_present:
@@ -309,7 +310,7 @@  def main(server, eventHandler, params, tf = TerminalFilter):
     warnings = 0
     taskfailures = []
 
-    termfilter = tf(main, helper, console, format)
+    termfilter = tf(main, helper, console, errconsole, format)
     atexit.register(termfilter.finish)
 
     while True: