Patchwork [3/3] oe.terminal: improve how we spawn screen

login
register
mail settings
Submitter Christopher Larson
Date April 5, 2011, 7:08 p.m.
Message ID <982144c56f216da099f77847abae4cbbf2fcb643.1302030219.git.chris_larson@mentor.com>
Download mbox | patch
Permalink /patch/1953/
State New, archived
Headers show

Comments

Christopher Larson - April 5, 2011, 7:08 p.m.
From: Chris Larson <chris_larson@mentor.com>

- Name the screen session 'devshell', to avoid confusion if running bitbake
  itself under a screen session.
- Display a warning message when spawning screen, so it's clear to the user
  that screen has been run (otherwise do_devshell just appears to hang).

Signed-off-by: Chris Larson <chris_larson@mentor.com>
---
 meta/lib/oe/terminal.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 8c8e5b2..a94b113 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -68,7 +68,12 @@  class Rxvt(XTerminal):
     priority = 1
 
 class Screen(Terminal):
-    cmd = 'screen -D -m -t "{title}" {cmd}'
+    cmd = 'screen -D -m -t "{title}" -S devshell {cmd}'
+
+    def __init__(self, cmd, title=None):
+        logger.warn('Screen started. Please connect in another terminal with '
+                    '"screen -r devshell"')
+        Terminal.__init__(self, cmd, title)
 
 
 def prioritized():