Skip to contentSkip to conversation

Clear Knotty footer before outputting to stderr

PATCH New Peter Kjellerstedt 1 participant 2 messages Apr 8, 2014

lore
Share & tools
lore
#0 lore raw

cover Clear Knotty footer before outputting to stderr

This fixes a problem with Knotty when errors are output to stderr while the footer of currently active tasks is displayed.

//Peter

The following changes since commit 68a55c8ff779d8df90626e68d5d4e48660dd8027:

ref-manual: Edits to fix up how GID and UIDs are handled. (2014-04-08 14:20:16 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib pkj/knotty_stderr
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/knotty_stderr

Peter Kjellerstedt (1):
bitbake: knotty: Clear footer before outputting to stderr

 bitbake/lib/bb/ui/knotty.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/1 bitbake: knotty: Clear footer before outputting to stderr

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.

---
 bitbake/lib/bb/ui/knotty.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
bitbake/lib/bb/ui/knotty.py +3 -2
index 80a4b32..41f1ba8 100644
@@ -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:
Signature · 1 line
1.9.0