Commit Graph

40 Commits

Author SHA1 Message Date
Andre McCurdy b1ffdf653c terminal.py: fix devshell with mate-terminal
Without the --disable-factory option, mate-terminal fails to start
with the error:

 | There was an error creating the child process for this terminal
 | Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)

The --disable-factory option was removed by:

  http://git.openembedded.org/openembedded-core/commit/?id=e8dca725ed8211a874472300a3ed50e494039ab9

apparently based on an assuption that mate-terminal continues to
track gnome-terminal since forking from it. However, based on the
mate-terminal man page in the upstream master branch, the option is
still supported:

  https://github.com/mate-desktop/mate-terminal

(From OE-Core rev: c7f769bd400756d180abf80dbfdf4ed2703fab60)

(From OE-Core rev: 764159600a202d1f0c2f0217c7bf7b55348a2f5d)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Andre McCurdy 452164e7d6 terminal.py: avoid 100% cpu while waiting for phonehome pid file
Some of the less common terminal types haven't been tested with the
recent phonehome pid file changes and there may be error cases where
the pid file is never created.

(From OE-Core rev: 6b0cf568e9fbe28fb6e7b17f4ad92348d33e2bf4)

(From OE-Core rev: 9aa06b3116c095a512be1d1f5da84ffaedf845dc)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Leonardo Sandoval 0f81fcb600 terminal: wait for terminal task to finish before procedding
This commit generalizes the work done in [1] and [2], both fixing
issues on several areas (the former with -c patch and gnome-terminal and
the latter with -c menuconfig and several terminals, including
gnome-terminal and tmux). The main idea is to get the PID
from the new spawned terminal and loop there until finished.

[1] 76e8ab47c9: terminal: Fix gnome-terminal to work with recent versions
[2] 7d02ea283b: cml1.bbclass: wait until menuconfig terminal finishes

(From OE-Core rev: 55707401d5bfb1f7686c273fc2d0db89df206395)

(From OE-Core rev: 3987dddff58410f1b2535ceb1f48aebbbd987889)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Martin Vuille b7deb1f046 terminal.py: Pass string instead of bytes to ExecutionError to avoid exception
Based on run() in bitbake/lib/bb/process.py, ExecutionError() expects strings
not bytes. Passing bytes results in a "TypeError: Can't convert 'bytes' object
to str implicitly" exception.

Fixes Bug 10729

(From OE-Core rev: 063b63d4d324c23322ac1b6b7c7928e725d7b968)

Signed-off-by: Martin Vuille <jpmv27@yahoo.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-30 15:48:08 +00:00
Stephano Cetola 93e8db2224 devshell: list commands when throwing NoSupportedTerminals
When attempting to run devshell, if no terminal is available, the
error being thrown was not very specific. This adds a list of
commands that failed, informing the user of what they can install to
fix the error.

[ YOCTO #10472]

(From OE-Core rev: c077f4aab2fc956408d4ad45c4e2e2ea6e480624)

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-23 11:10:13 +00:00
Davis, Michael e66f5eabed terminal.py: Add compatiblity for konsole 16.08.1
Konsole has dropped support for the nofork flag.  It has been replaced with the seperate flag.

(From OE-Core rev: f0b193b63d4c468c3aa58e15ef5a991e04b9b9a2)

Signed-off-by: Michael Davis <michael.davis@essvote.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-28 16:15:18 +01:00
Jacob Kroon 17d728dede terminal: Add sleep in pid-monitor loop
Monitoring the process started by gnome-terminal was
spinning in a busy-loop. Insert some sleeping so that
we don't eat all the cpu.

(From OE-Core rev: 314937429d700204f296cfd1c0c5f215a2e5b939)

Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-10 10:46:31 +01:00
Richard Purdie d6abd75595 terminal: Drop gnome-terminal --disable-factory workarounds
With the new pid monitoring code we have for recent versions of
gnome-terminal we can just drop the --disable-factory code now since
the other solution handles this case as well.

(From OE-Core rev: ed4957c444a2982c19e2f1f96d9afb2a992c1daf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 10:50:18 +01:00
Richard Purdie c706bfbabb terminal: Fix gnome-terminal to work with recent versions
Currently gnome-terminal just returns straight away, opening a terminal in a new
separate process we have no insight into. For patch resolution, this leads to
spawning many different terminal windows, for pydevshell, it just flashes a window
up and then closes.

We need to block until the command completes but gnome-terminal gives us no way
to do this. We therefore write the pid to a file using a "phonehome" wrapper
script, then monitor the pid until it exits.

[YOCTO #7254]
(also fixing do_devpyshell)

(From OE-Core rev: 76e8ab47c936674b8bb9bf1c48de53b30f5bf74a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 10:50:18 +01:00
Leonardo Sandoval 8a6c198381 lib/oe/terminal.py: decode bytes variable before rstrip/split
On python 3, bytes variable types must be decoded if these are intended to be
used as strings, otherwise we get the following error exception:

    TypeError: Type str doesn't support the buffer API

(From OE-Core rev: b950539c911b7945d652b05616164828e711ac7f)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12 23:47:17 +01:00
Richard Purdie 3b39971748 classes/lib: Complete transition to python3
This patch contains all the other misc pieces of the transition to
python3 which didn't make sense to be broken into individual patches.

(From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:01 +01:00
Pascal Bach 36b43b233c lib/oe/terminal: set workdir for konsole terminal
It seems that if the --workdir option is not set konsole does open in the users
home directory. By setting --workdir . konsole opens in the recipes work
directory. This is the same behavior as observed for other consoles.
(Tested with Konsole 2.14.2 on Debian Jessie).

(From OE-Core rev: bd06944249c3de3f629c013e14f446464441c4da)

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-14 11:42:19 +00:00
Dariusz Pelowski a88505b450 lib/oe/terminal: use C locale when determining version
(From OE-Core rev: 5e5bf4f7e242494ed9c2cbc13bec7f21494db17c)

Signed-off-by: Dariusz Pelowski <dariusz.pelowski@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:02 +00:00
Leonardo Sandoval e864f71f4c terminal: Open a new window instead of split on older tmux versions (<1.9)
If an old version is detected (<1.9), create a new window instead of split:
the reason is that there is no easy way to get the active pane height if no
nested formats are supported.

(From OE-Core rev: 457bd6297ae99627c5f596c3c09086d787d5a5ab)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-11-25 08:08:08 +00:00
Leonardo Sandoval a8ae7317e2 terminal.py: Allow devshell/menuconfig on recent gnome-terminal
Recent versions of gnome-terminal does not support non-UTF8 charset:
https://bugzilla.gnome.org/show_bug.cgi?id=732127 as a result, devshell and
menuconfig tasks silently hang  (error found on trace log of 'strace -f -v
-s 8192 -e write=2 bitbake -c devshell quilt-native': "Non UTF-8 locale
(ANSI_X3.4-1968) is not supported!"). As a workaround, clearing the LC_ALL
environment variable so it uses the locale. Once fixed on the gnome-terminal
project, this should be removed.

Tested on gnome-terminal versions:

       GNOME Terminal 3.4.1.1
       GNOME Terminal 3.14.2 (Default on Ubuntu 15.04)

[YOCTO #7791]

(From OE-Core rev: ec79684a1eb594099d342a416ba3f5ad0b342a53)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:51 +01:00
Paul Eggleton 6d7cf8e9dd lib/oe/terminal: fix konsole terminal support for KDE 4.x
It seems that the --nofork option genuinely stops konsole from going
into the background now; I'm not sure when this changed but it does seem
to be working so we can use it. (Tested with Konsole 2.10 and 2.14.2).

Fixes [YOCTO #4934].

(From OE-Core rev: 49b21abf1020b2eefbbec98415c3d7de8827c993)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-26 07:47:50 +00:00
Paul Eggleton f160730bbd lib/oe/terminal: fix regressions
Fix up some issues introduced by OE-Core commit
818c94f5b9882c2028ef9f056714a0a3c9045551:

* If we want to support versions with more than two parts, versions with
  only one part, or versions with non-integer parts, then we have to
  stay with strings. We can use distutils.version.LooseVersion() to help
  with comparisons.
* We don't want a warning when launching gnome-terminal 3.10+ and
  logger.warn() doesn't take a first integer parameter anyway
  (logger.debug() does).
* Also clean up tabs.

(From OE-Core rev: 565d4a144ab3b8fe04950392497de1e0cf1152a5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-26 07:47:50 +00:00
Sven Ebenfeld 43afafeffa terminal.py: No --disable-factory for gnome-terminal >= 3.10
--disable-factory has been disabled in earlier versions of gnome-terminal
but from version 3.10 it raises an error and quits. This makes devshell
unusable with gnome-terminal >= 3.10. This patch checks for the version and
removes --disable-factory if you have the terminal version 3.10 or higher.

(From OE-Core rev: 818c94f5b9882c2028ef9f056714a0a3c9045551)

Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24 23:34:19 +00:00
Dan McGregor 7c3b9a9a9f terminal.py: add tmux new window option
Add a new terminal type that makes a new window in the running tmux
session instead of splitting the window. 80x25 is not enough to run
menuconfig inside a split window, so add the option to create a new
window instead.

Use the new window option by default when the split window would be
less than 19 lines high.

(From OE-Core rev: d7ef9e49b1c687279f6eb2c7abc32ff915714177)

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-08 08:00:26 +00:00
Rodrigo Chiossi da35877db8 lib/oe/terminal: add support for Terminology terminal emulator
Terminology is the default Enlightenment terminal emulator

(From OE-Core rev: f3da8570a977809fadb08315f384726b80f5ee01)

Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 14:53:54 +00:00
Alejandro Hernandez 57647c9cbb terminal.py: fixes launching multiple windows of gnome-terminal
When resolving a patch, a new process of gnome-terminal
is created for every patch to be resolved, it "waits"
for the previous one to end, instead of launching
multiple windows at the same time.

[YOCTO #7254]

(From OE-Core rev: b457e0b028418260aee25858b8af8938dd038fac)

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 14:53:53 +00:00
Andreas Müller bb3f5ce741 make menuconfig work for recent xfce environment
xfce terminal was renamed 'Terminal' -> 'xfce4-teminal' mainline end of 2012,
so the distros supporting 'Terminal' will dissapear. The distros not
mentionied in  __init__ do (e.g fedora 19 - tested) fail - or will fail
sooner or later.

(From OE-Core rev: d07f3812ec371da6f18fa1dd920cdde470bd89ad)

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-23 11:43:27 +01:00
Jacob Kroon 3de579c28d meta/lib/oe/terminal.py: Don't pass non-supported '--disable-factory' flag to gnome-terminal
By default, all GNOME terminals share a single process,
reducing memory usage.  This can be disabled by starting gnome-terminal
with the --disable-factory option

However, gnome-terminal in Fedora 20 does no longer support the
'--disable-factory' flag, so remove it. As the support for 'mate' terminals was
added as a copy of the gnome code in 8cc078a9c679845464c59028f584d7aba098cc1f,
remove the flag here aswell.

(From OE-Core rev: e8dca725ed8211a874472300a3ed50e494039ab9)

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 12:56:29 +00:00
Andre McCurdy cc94000792 lib/oe/terminal.py: add support for MATE desktop terminals
A simple clone of the corresponding Gnome class. Without this, devshell
fails completely on a default installation of MATE desktop Linux Mint 15.

(From OE-Core rev: 8cc078a9c679845464c59028f584d7aba098cc1f)

Signed-off-by: Andre McCurdy <andre.mccurdy@entropic.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-31 06:59:55 +01:00
Tyler Hall 85186302de TmuxRunning: handle multi-word commands
Just as in f8ed7446755eeb88191e16749350efa1e7e6197c, tmux wants a single
argument for its command. This applies to the "split-window" command as
well as "new."

Note that this alone is not enough to fix the TmuxRunning devshell when
using pseudo because tmux does not preserve the environment that pseudo
requires.

(From OE-Core rev: 36fb9799d6a449d86acca3be354af56ad87c3151)

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-02 22:23:51 +01:00
Peter Seebach 1f99e74e00 handle two-word commands with tmux
Trying to make a devshell using tmux can fail because "tmux new"
expects a single command, not a series of arguments. It does, however,
split strings in a suitable way. So you can quote the command.

The failure mode is particularly arcane, in that you end up
with a message like:

	ERROR: Unable to spawn terminal auto: \
	Execution of 'pseudo /bin/bash' failed with exit code 1:
	usage: new-session [-d] [-n window-name] [-s session-name] \
	[-t target-session] [command]

which is confusing because there's no "new-session" anywhere in
sight (that's actually "tmux new"), and because what failed to execute
wasn't either pseudo or bash.

(From OE-Core rev: f8ed7446755eeb88191e16749350efa1e7e6197c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-11 15:55:58 +01:00
Richard Purdie feeffdb5b6 meta/lib/oe: Replace StandardError with Exception
StandardError is removed in python3, replace with Exception class instead.

(From OE-Core rev: a37ae30b9766df346ca57755530024a0b7d5f86b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09 14:06:51 +01:00
Christopher Larson d61d0a1fc8 oe.terminal: add tmux classes
This adds two new Terminal classes. It's separated into two, so that opening
a split inside a tmux window is preferred to the other terminal types, but
opening a tmux session is prioritized only slightly higher than screen.

- tmuxrunning: Open a new pane in the current running tmux window. Requires
  that the TMUX variable be added to the env whitelist to use it.
- tmux: Open a new tmux session

(From OE-Core rev: 10f64d202ceb230c3c79e09dce182ffce94d1117)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-15 15:57:29 +01:00
Christopher Larson 59e425455f oe.terminal: add tmux classes
This adds two new Terminal classes. It's separated into two, so that opening
a split inside a tmux window is preferred to the other terminal types, but
opening a tmux session is prioritized only slightly higher than screen.

- tmuxrunning: Open a new pane in the current running tmux window. Requires
  that the TMUX variable be added to the env whitelist to use it.
- tmux: Open a new tmux session

(From OE-Core rev: 31c58d584f838738a6b6258b87b1c7e6ca173086)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-04 23:52:21 +01:00
Morten Minde Neergaard c45a7d127e terminal: Add support for running custom terminals.
Example config:
OE_TERMINAL = "custom"
OE_TERMINAL_CUSTOMCMD = "mysuperterm"

(From OE-Core rev: c76da87511d2668479745c2f18b8a9b8116c7489)

Signed-off-by: Morten Minde Neergaard <mneergaa@cisco.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 12:50:46 +01:00
Jason Wessel 86cf6daff9 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.

(From OE-Core rev: 39193bdce698b6339c3d7643eb3c1fcd2246fd56)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:30 +01:00
Jason Wessel 6e0713a3e7 terminal: pass data store all the way through to terminal class
Passing the data store will be needed for firing a custom event
for the screen class.

(From OE-Core rev: 5ccff8d44626bfd3d1af2a7f81f0567997277809)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-24 15:35:30 +01:00
Jason Wessel 3405a8bbe4 terminal.py: use unique ids for screen sessions
When running multiple sets of builds on the same
system, it is hard to distinguish which build belongs
to which screen session and you can end up resuming
the wrong session.

The simple solution is to just append the process
id to the screen session invocation to make each
unique.

(From OE-Core rev: 1677b736bca5dc46db522da1874459d2de77209d)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-25 14:47:01 +01:00
Richard Purdie 73cf0335c4 Remove a number of unneeded import os/bb calls
The bb and os modules are always imported so having these extra import calls
are a waste of space/execution time. They also set a bad example for people
copy and pasting code so clean them up.

(From OE-Core rev: 7d674820958be3a7051ea619effe1a6061d9cbe2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 12:24:50 +01:00
Jeffrey C Honig 76a16c0c11 terminal.py: Fix Xfce on ubuntu/debian; some cleanup
* Xfce class was setting and passing wrong variable for ubuntu/debian.
    * Xfce class was using -e instead of -x for passing command.  The former creates
      a shell escape nightmare
    * Clean up local and instance/class variables with same name but different usage.
    * Remove side-effect and directly return formatted command for clarity.

(From OE-Core rev: b2ee5c5e34cdc3d65ca7b5da3486360a74d6c500)

Signed-off-by: Jeffrey C Honig <jeffrey.honig@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-18 14:29:29 +01:00
Joshua Lock 0f24f2dd70 lib/oe/terminal: add support for XFCE's terminal emulator
That's Terminal on Fedora and xfce4-terminal on Ubuntu/Debian... This
could get interesting!

(From OE-Core rev: 162b70a36388ac44fc1b39e172cd53579707bff3)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-01 14:51:37 +00:00
Paul Eggleton 9b5175255b lib/oe/terminal.py: declare konsole from KDE 4.x as unsupported
Konsole 2.x (from KDE 4.x) does not work as devshell - it does not pass
the environment or current working directory through among other issues,
so do a version check and disable it if it is found (skipping to the
next available terminal application.)

(From OE-Core rev: ee57cd7deb778dc72e58668d8c71cf840a3bc0d9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-19 04:52:48 +01:00
Chris Larson d0552e9c65 oe.terminal: improve how we spawn screen
- 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).

(From OE-Core rev: 13e01d29d14e7e7403d0c45c5699ea9160243868)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-10 13:33:07 +01:00
Chris Larson 057cc1e816 Rework how the devshell functions
In the new implementation, each known terminal is defined as a class in
oe.terminal, as a subclass of bb.process.Popen.  terminal.bbclass wraps this
functionality, providing the metadata pieces.  It obeys the OE_TERMINAL
variable, which is a 'choice' typed variable.  This variable may be 'auto',
'none', or any of the names of the defined terminals.

When using 'auto', or requesting an unsupported terminal, we attempt to spawn
them in priority order until we get one that's available on this system (and
in the case of the X terminals, has DISPLAY defined).  The 'none' value is
used when we're doing things like automated builds, and want to ensure that no
terminal is *ever* spawned, under any circumstances.

Current available terminals:

    gnome
    konsole
    xterm
    rxvt
    screen

(From OE-Core rev: 69f77f80965fa06a057837f8f49eda06855c4086)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-10 13:33:07 +01:00