[OE-core] [bitbake-devel] [PATCH] ui/knotty: Add a footer to the build output for interactive terminals

Martin Jansa martin.jansa at gmail.com
Wed Mar 21 16:19:36 UTC 2012


On Tue, Mar 20, 2012 at 01:24:00PM +0100, Koen Kooi wrote:
> 
> Op 15 mrt. 2012, om 23:56 heeft Richard Purdie het volgende geschreven:
> 
> > I've sent this before, this is an updated version with several bugfixes
> > and improvements. Its a major change but one I think people will like
> > overall as I hear a lot of complaints about the verbose console
> > messages. v0 never got complaints so I will merge this fairly quickly
> > unless there are objections.
> > 
> > ---
> > On terminals which support it, add summary information to the end of the
> > build output about the number of tasks currently running and how many tasks
> > we've run so far.
> > 
> > This provides a summary at a glace of what the current state of the build is
> > and what the build is currently doing which is lacking in the current UI.
> > 
> > Also disable echo of characters on stdin since this corrupts the disable,
> > particularly Crtl+C.
> > 
> > The "waiting for X tasks" code can be merged into this code too since
> > that is only useful on interactive terminals and this improves the
> > readability of that output too.
> > 
> > Improvements since v0:
> > 
> > * The tasks are ordered in execution order.
> > * The display is only updated when the list of tasks changes or there
> >  is output above the footer.
> > * Errors early in the init process don't corrupt the terminal
> > * Running task x of y and package messages are suppressed from the console
> 
> I like it a lot, but there is one missing thing. Have a look at the following output:

I like it too.

1) it doesn't break my usual use-case 
bitbake foo | tee -a log.${MACHINE}

2) with more threads it was hard to see that task is on "background"

But as I often want to see if some particular task was already finished
then I've changed InteractConsoleLogFilter like this to keep
task Started/Succeeded messages above footer.

Cheers,
-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
From dab4d382e9257d2493e36dccf67b9d1d056965bf Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa at gmail.com>
Date: Wed, 21 Mar 2012 17:09:45 +0100
Subject: [PATCH] knotty: filter only "Running" NOTEs

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 lib/bb/ui/knotty.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py
index 4a7e6b9..61ff9dd 100644
--- a/lib/bb/ui/knotty.py
+++ b/lib/bb/ui/knotty.py
@@ -174,7 +174,7 @@ def main(server, eventHandler):
 
     class InteractConsoleLogFilter(logging.Filter):
         def filter(self, record):
-            if record.levelno == format.NOTE and (record.msg.startswith("Running") or record.msg.startswith("package ")):
+            if record.levelno == format.NOTE and record.msg.startswith("Running"):
                 return False
             clearFooter()
             return True
-- 
1.7.8.5

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20120321/f88b7c91/attachment-0002.sig>


More information about the Openembedded-core mailing list