aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-03-29 12:53:19 -0700
committerChris Larson <chris_larson@mentor.com>2011-05-18 09:55:58 -0700
commit96e4df5d0b4e27e40a2a6b5d7db2631b9c203010 (patch)
tree682d112618a738f29885a73038abac9d4968083b /meta/classes
parent95c1c690d14f493b615eafeb349d57aa67366b5d (diff)
downloadopenembedded-core-contrib-96e4df5d0b4e27e40a2a6b5d7db2631b9c203010.tar.gz
openembedded-core-contrib-96e4df5d0b4e27e40a2a6b5d7db2631b9c203010.tar.bz2
openembedded-core-contrib-96e4df5d0b4e27e40a2a6b5d7db2631b9c203010.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. 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')
-rw-r--r--meta/classes/devshell.bbclass25
1 files changed, 6 insertions, 19 deletions
diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index 5f262f426e..216a9dc96a 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -1,22 +1,9 @@
-do_devshell[dirs] = "${S}"
-do_devshell[nostamp] = "1"
-
-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 () {
+ import oe.terminal
+ oe.terminal.run(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"