mirror of
https://git.yoctoproject.org/poky
synced 2026-02-06 08:48:45 +01:00
Some versions of the screen utility provided from the host OS vendor write the socket directory to $HOME/.screen. When using a shared home directory across many servers, one sets the SCREENDIR environment variable to avoid collisions in the shared home directory. This results in problems launching a devshell where it is not entirely obvious what happened because the SCREENDIR environment variable got stripped from the environment prior to setting up the screen in detached mode. Example: % bitbake -c devshell busybox # ...Please connect in another terminal with "screen -r devshell" % screen -r devshell There is no screen to be resumed matching devshell. The temporary work around was to do something like: sh -c "unset SCREENDIR; screen -r devshell" This patch adds SCREENDIR to the white list to ensure screen works properly on systems where a developer needs to use the SCREENDIR with shared home directories. (From OE-Core rev: 5568a8f5a1c65bae021b2e36d735d3153acc6d72) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
OE_TERMINAL ?= 'auto'
|
|
OE_TERMINAL[type] = 'choice'
|
|
OE_TERMINAL[choices] = 'auto none \
|
|
${@" ".join(o.name \
|
|
for o in oe.terminal.prioritized())}'
|
|
|
|
OE_TERMINAL_EXPORTS = 'XAUTHORITY SHELL DBUS_SESSION_BUS_ADDRESS DISPLAY EXTRA_OEMAKE SCREENDIR'
|
|
OE_TERMINAL_EXPORTS[type] = 'list'
|
|
|
|
XAUTHORITY ?= "${HOME}/.Xauthority"
|
|
SHELL ?= "bash"
|
|
|
|
|
|
def oe_terminal(command, title, d):
|
|
import oe.data
|
|
import oe.terminal
|
|
|
|
for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
|
|
value = d.getVar(export, True)
|
|
if value is not None:
|
|
os.environ[export] = str(value)
|
|
|
|
terminal = oe.data.typed_value('OE_TERMINAL', d).lower()
|
|
if terminal == 'none':
|
|
bb.fatal('Devshell usage disabled with OE_TERMINAL')
|
|
elif terminal != 'auto':
|
|
try:
|
|
oe.terminal.spawn(terminal, command, title)
|
|
return
|
|
except oe.terminal.UnsupportedTerminal:
|
|
bb.warn('Unsupported terminal "%s", defaulting to "auto"' %
|
|
terminal)
|
|
except oe.terminal.ExecutionError as exc:
|
|
bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))
|
|
|
|
try:
|
|
oe.terminal.spawn_preferred(command, title)
|
|
except oe.terminal.NoSupportedTerminals:
|
|
bb.fatal('No valid terminal found, unable to open devshell')
|
|
except oe.terminal.ExecutionError as exc:
|
|
bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))
|