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

login
register
mail settings
Submitter Christopher Larson
Date Aug. 9, 2011, 6:06 p.m.
Message ID <eb2be5e5a2cd0348ee06d25278d3622cfe0c31cb.1312903907.git.kergoth@gmail.com>
Download mbox | patch
Permalink /patch/9561/
State New, archived
Headers show

Comments

Christopher Larson - Aug. 9, 2011, 6:06 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 3767935..3965462 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -70,7 +70,12 @@  class Rxvt(XTerminal):
     priority = 1
 
 class Screen(Terminal):
-    command = 'screen -D -m -t "{title}" {command}'
+    command = 'screen -D -m -t "{title}" -S devshell {command}'
+
+    def __init__(self, command, title=None, env=None):
+        Terminal.__init__(self, command, title, env)
+        logger.warn('Screen started. Please connect in another terminal with '
+                    '"screen -r devshell"')
 
 
 def prioritized():