diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2012-09-17 17:43:51 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-24 15:31:35 +0100 |
commit | 39193bdce698b6339c3d7643eb3c1fcd2246fd56 (patch) | |
tree | 081245edfb8f189fc00134cbd683a82b4307a54f /meta/lib | |
parent | 5ccff8d44626bfd3d1af2a7f81f0567997277809 (diff) | |
download | openembedded-core-39193bdce698b6339c3d7643eb3c1fcd2246fd56.tar.gz openembedded-core-39193bdce698b6339c3d7643eb3c1fcd2246fd56.tar.bz2 openembedded-core-39193bdce698b6339c3d7643eb3c1fcd2246fd56.zip |
terminal: Send LogExecTTY event to spawn screen
Bitbake has the ability to request to run a command
and if it is not possible fall back to emitting a
log message. This can be used to start a screen
client automatically on the controling tty if
the UI has an interactive tty.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/terminal.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py index 352a28239a..71d8a43410 100644 --- a/meta/lib/oe/terminal.py +++ b/meta/lib/oe/terminal.py @@ -96,9 +96,14 @@ class Screen(Terminal): def __init__(self, sh_cmd, title=None, env=None, d=None): s_id = "devshell_%i" % os.getpid() self.command = "screen -D -m -t \"{title}\" -S %s {command}" % s_id - Terminal.__init__(self, sh_cmd, title, env) - logger.warn('Screen started. Please connect in another terminal with ' - '"screen -r devshell %s"' % s_id) + Terminal.__init__(self, sh_cmd, title, env, d) + msg = 'Screen started. Please connect in another terminal with ' \ + '"screen -r %s"' % s_id + if (d): + bb.event.fire(bb.event.LogExecTTY(msg, "screen -r %s" % s_id, + 0.5, 10), d) + else: + logger.warn(msg) def prioritized(): |