summaryrefslogtreecommitdiffstats
path: root/meta/classes/terminal.bbclass
diff options
context:
space:
mode:
authorStephano Cetola <stephano.cetola@linux.intel.com>2016-11-14 18:30:11 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-23 11:02:28 +0000
commitc077f4aab2fc956408d4ad45c4e2e2ea6e480624 (patch)
tree174458733234d3da3b91a516d1fe6f44a7cb030d /meta/classes/terminal.bbclass
parente12912ac7484654c201d167831b302a821e14972 (diff)
downloadopenembedded-core-c077f4aab2fc956408d4ad45c4e2e2ea6e480624.tar.gz
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] Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/terminal.bbclass')
-rw-r--r--meta/classes/terminal.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index a94f755a40..cd8d124507 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -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))