Received: from mail1.windriver.com ([147.11.146.13]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1SZzWX-0004DX-A2 for bitbake-devel@lists.openembedded.org; Thu, 31 May 2012 09:10:21 +0200 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca [147.11.189.40]) by mail1.windriver.com (8.14.3/8.14.3) with ESMTP id q4V5EIUD025391 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 30 May 2012 22:14:18 -0700 (PDT) Received: from ord-jrw.wrs.com (172.25.32.41) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.1.255.0; Wed, 30 May 2012 22:14:17 -0700 From: Jason Wessel To: Date: Thu, 31 May 2012 00:14:00 -0500 Message-ID: <1338441241-32230-6-git-send-email-jason.wessel@windriver.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1338441241-32230-1-git-send-email-jason.wessel@windriver.com> References: <1338441241-32230-1-git-send-email-jason.wessel@windriver.com> MIME-Version: 1.0 Subject: [PATCH 5/6] knotty.py: Add the ability to spawn screen directly from knotty with OE_TERMINAL=screen_inline X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2012 07:10:21 -0000 Content-Type: text/plain The oe-core has a change pending to add the screen_inline class. This change allows the simple use case of directly using a devshell from the controlling terminal that started bitbake which is a significant convience for some use cases. Signed-off-by: Jason Wessel --- lib/bb/ui/knotty.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/bb/ui/knotty.py b/lib/bb/ui/knotty.py index 7a7a1b2..6eca0b5 100644 --- a/lib/bb/ui/knotty.py +++ b/lib/bb/ui/knotty.py @@ -174,6 +174,11 @@ def main(server, eventHandler, tf = TerminalFilter): includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"]) loglines = server.runCommand(["getVariable", "BBINCLUDELOGS_LINES"]) consolelogfile = server.runCommand(["getVariable", "BB_CONSOLELOG"]) + oeterminal = server.runCommand(["getVariable", "OE_TERMINAL"]) + if oeterminal == "screen_inline" and sys.stdin.isatty() and sys.stdout.isatty(): + runscreen = True + else: + runscreen = False # MultiTail affected varialbles numthreads = server.runCommand(["getVariable", "BB_NUMBER_THREADS"]) @@ -260,6 +265,12 @@ def main(server, eventHandler, tf = TerminalFilter): errors = errors + 1 return_value = 1 elif event.levelno == format.WARNING: + msg = event.getMessage() + if runscreen and msg.startswith("Screen Connect Command: "): + msg = msg[24:] + print "Starting terminal with: %s" % msg + os.system(msg) + continue warnings = warnings + 1 # For "normal" logging conditions, don't show note logs from tasks # but do show them if the user has changed the default log level to -- 1.7.10