From 46d62d076dd08c57f87b10be098cf47b34c41176 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 7 Jan 2016 13:18:20 +0000 Subject: bitbake: knotty: Use non-interactive mode as fallback for dumb terminals 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] (Bitbake rev: 6f84cf4bd77f35fcd07e0b2f5149f1d6866a414d) Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb/ui') diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 053d1e978b..b42f8eb888 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)) -- cgit v1.2.3-54-g00ecf