Skip to contentSkip to conversation

knotty: Use non-interactive mode as fallback for dumb terminals

PATCH New Richard Purdie 1 participant 1 message Jan 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 knotty: Use non-interactive mode as fallback for dumb terminals

TERM=dumb bitbake X

shows no output fot task status which is suboptimal. Use the non-interactive mode if the terminal doesn't support what we need for interactive mode giving a better user experience. Also print a note to the console to say this has happened.

[YOCTO #8768]

bitbake/lib/bb/ui/knotty.py +4 -0
index 053d1e9..b42f8eb 100644
@@ -174,6 +174,10 @@ class TerminalFilter(object):
             self.rows, self.columns = self.getTerminalColumns()
         except:
             self.cuu = None
+        if not self.cuu:
+            self.interactive = False
+            bb.note("Unable to use interactive mode for this terminal, using fallback")
+            return
         console.addFilter(InteractConsoleLogFilter(self, format))
         errconsole.addFilter(InteractConsoleLogFilter(self, format))