From: "Randy MacLeod" <randy.macleod@windriver.com>
To: Joe Slater <joe.slater@windriver.com>,
<openembedded-core@lists.openembedded.org>
Subject: Re: [oe-core][PATCH 1/1] terminal.py: do not stop searching for auto
Date: Thu, 21 May 2020 15:52:31 -0400 [thread overview]
Message-ID: <b10310e2-e33e-eef9-d070-a3bbab96a8a1@windriver.com> (raw)
In-Reply-To: <20200521184107.103889-1-joe.slater@windriver.com>
On 2020-05-21 2:41 p.m., Joe Slater wrote:
> If a terminal fails to spawn() we should continue looking.
> gnome-terminal, in particular can be present but not start.
Do you mean that it doesn't start on the first try but that
it may / usually does start on subsequent tries?
Since the user has set the preferred terminal,
this change could confuse them and therefore seems wrong.
If we know of flaky terminal implementations, why not look
for specific versions, issue a warning and either retry
or tell the user to try again? In a few years, we can discard
the code when the flaky terminal version is no longer used.
Is there a bug open with gnome-terminal to track this?
What distro/gnome-terminal do you see this problem in?
>
> Signed-off-by: Joe Slater <joe.slater@windriver.com>
> ---
> meta/lib/oe/terminal.py | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
> index a1daa2bed6..eb10a6e33e 100644
> --- a/meta/lib/oe/terminal.py
> +++ b/meta/lib/oe/terminal.py
> @@ -207,7 +207,10 @@ def spawn_preferred(sh_cmd, title=None, env=None, d=None):
> spawn(terminal.name, sh_cmd, title, env, d)
> break
> except UnsupportedTerminal:
> - continue
> + pass
> + except:
> + bb.warn("Terminal %s is supported but did not start" % (terminal.name))
> + # when we've run out of options
> else:
> raise NoSupportedTerminals(get_cmd_list())
>
>
The full function is:
def spawn_preferred(sh_cmd, title=None, env=None, d=None):
"""Spawn the first supported terminal, by priority"""
for terminal in prioritized():
try:
spawn(terminal.name, sh_cmd, title, env, d)
break
except UnsupportedTerminal:
continue
else:
raise NoSupportedTerminals(get_cmd_list())
so you'll need to change the doc string if you want to retry 3 times.
--
# Randy MacLeod
# Wind River Linux
next prev parent reply other threads:[~2020-05-21 19:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 18:41 [oe-core][PATCH 1/1] terminal.py: do not stop searching for auto Joe Slater
2020-05-21 19:52 ` Randy MacLeod [this message]
2020-05-21 20:55 ` Richard Purdie
2020-05-22 0:36 ` Joe Slater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b10310e2-e33e-eef9-d070-a3bbab96a8a1@windriver.com \
--to=randy.macleod@windriver.com \
--cc=joe.slater@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.