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:25:11 +0100 |
commit | 69f77f80965fa06a057837f8f49eda06855c4086 (patch) | |
tree | 78bb7b633b22a16d2fa4e63b1c4c4dd6dcc6dd4e /meta/classes/devshell.bbclass | |
parent | fa7fbc9695829f7fa981b16d9559e9e984494e09 (diff) | |
download | openembedded-core-69f77f80965fa06a057837f8f49eda06855c4086.tar.gz openembedded-core-69f77f80965fa06a057837f8f49eda06855c4086.tar.bz2 openembedded-core-69f77f80965fa06a057837f8f49eda06855c4086.tar.xz openembedded-core-69f77f80965fa06a057837f8f49eda06855c4086.zip |
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
Signed-off-by: Chris Larson <chris_larson@mentor.com>
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 5f262f426..ddb6e5530 100644 --- a/meta/classes/devshell.bbclass +++ b/meta/classes/devshell.bbclass @@ -1,22 +1,10 @@ -do_devshell[dirs] = "${S}" -do_devshell[nostamp] = "1" +inherit terminal -XAUTHORITY ?= "${HOME}/.Xauthority" - -devshell_do_devshell() { - export DISPLAY='${DISPLAY}' - export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}' - export XAUTHORITY='${XAUTHORITY}' - export TERMWINDOWTITLE="Bitbake Developer Shell" - export EXTRA_OEMAKE='${EXTRA_OEMAKE}' - export SHELLCMDS="bash" - ${TERMCMDRUN} - if [ $? -ne 0 ]; then - echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable." - exit 1 - fi +python do_devshell () { + oe_terminal(d.getVar('SHELL', True), 'OpenEmbedded Developer Shell', d) } -addtask devshell after do_patch -EXPORT_FUNCTIONS do_devshell +addtask devshell after do_patch +do_devshell[dirs] = "${S}" +do_devshell[nostamp] = "1" |