All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] knotty: Use non-interactive mode as fallback for dumb terminals
@ 2016-01-07 11:06 Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2016-01-07 11:06 UTC (permalink / raw)
  To: bitbake-devel; +Cc: ulfalizer

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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 053d1e9..b42f8eb 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -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))
 




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] knotty: Use non-interactive mode as fallback for dumb terminals
@ 2016-01-07 13:18 Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2016-01-07 13:18 UTC (permalink / raw)
  To: bitbake-devel

TERM=dumb bitbake X

shows no output for 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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 053d1e9..b42f8eb 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -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))
 




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-07 13:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-07 11:06 [PATCH] knotty: Use non-interactive mode as fallback for dumb terminals Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2016-01-07 13:18 Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.