1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 13:29:49 +00:00

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>
This commit is contained in:
Stephano Cetola
2016-11-14 18:30:11 -08:00
committed by Richard Purdie
parent 52f42d7677
commit 93e8db2224
2 changed files with 17 additions and 4 deletions
+6 -2
View File
@@ -88,8 +88,12 @@ def oe_terminal(command, title, d):
try:
oe.terminal.spawn_preferred(command, title, None, d)
except oe.terminal.NoSupportedTerminals:
bb.fatal('No valid terminal found, unable to open devshell')
except oe.terminal.NoSupportedTerminals as nosup:
nosup.terms.remove("false")
cmds = '\n\t'.join(nosup.terms).replace("{command}",
"do_terminal").replace("{title}", title)
bb.fatal('No valid terminal found, unable to open devshell.\n' +
'Tried the following commands:\n\t%s' % cmds)
except oe.terminal.ExecutionError as exc:
bb.fatal('Unable to spawn terminal %s: %s' % (terminal, exc))