diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-03-29 12:53:19 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-08-10 13:33:07 +0100 |
commit | 057cc1e8162017b63a334953eb0998863e6b640f (patch) | |
tree | fb42e2631b26c3757fe7774bfba07e8f5bf34c9c /meta/classes/devshell.bbclass | |
parent | 94faa71d5c1b25510219ee04c831daa9f242b883 (diff) | |
download | poky-057cc1e8162017b63a334953eb0998863e6b640f.tar.gz |
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>
Diffstat (limited to 'meta/classes/devshell.bbclass')
-rw-r--r-- | meta/classes/devshell.bbclass | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass index 5f262f426e..ddb6e55303 100644 --- a/meta/classes/devshell.bbclass +++ b/meta/classes/devshell.bbclass | |||
@@ -1,22 +1,10 @@ | |||
1 | do_devshell[dirs] = "${S}" | 1 | inherit terminal |
2 | do_devshell[nostamp] = "1" | ||
3 | 2 | ||
4 | XAUTHORITY ?= "${HOME}/.Xauthority" | 3 | python do_devshell () { |
5 | 4 | oe_terminal(d.getVar('SHELL', True), 'OpenEmbedded Developer Shell', d) | |
6 | devshell_do_devshell() { | ||
7 | export DISPLAY='${DISPLAY}' | ||
8 | export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}' | ||
9 | export XAUTHORITY='${XAUTHORITY}' | ||
10 | export TERMWINDOWTITLE="Bitbake Developer Shell" | ||
11 | export EXTRA_OEMAKE='${EXTRA_OEMAKE}' | ||
12 | export SHELLCMDS="bash" | ||
13 | ${TERMCMDRUN} | ||
14 | if [ $? -ne 0 ]; then | ||
15 | echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable." | ||
16 | exit 1 | ||
17 | fi | ||
18 | } | 5 | } |
19 | addtask devshell after do_patch | ||
20 | 6 | ||
21 | EXPORT_FUNCTIONS do_devshell | 7 | addtask devshell after do_patch |
22 | 8 | ||
9 | do_devshell[dirs] = "${S}" | ||
10 | do_devshell[nostamp] = "1" | ||