* [PATCH] check bitbake server-only port is a number
@ 2016-10-07 21:46 Benjamin Esquivel
2016-10-08 6:49 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Esquivel @ 2016-10-07 21:46 UTC (permalink / raw)
To: openembedded-core
either using the memres script or the bitbake call with --server-only
if the port is a string instead of a number then the process hangs
indefinitely causing a loop that never ends.
adding a check at the beginning for the port being a number otherwise
end prematurely.
[YOCTO#10397]
Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
---
bitbake/lib/bb/main.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index 7f7d87b..f2f59f6 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -402,6 +402,13 @@ def bitbake_main(configParams, configuration):
if not configParams.bind:
raise BBMainException("FATAL: The '--server-only' option requires a name/address "
"to bind to with the -B option.\n")
+ else:
+ try:
+ #Checking that the port is a number
+ int(configParams.bind.split(":")[1])
+ except (ValueError,IndexError):
+ raise BBMainException(
+ "FATAL: Malformed host:port bind parameter")
if configParams.remote_server:
raise BBMainException("FATAL: The '--server-only' option conflicts with %s.\n" %
("the BBSERVER environment variable" if "BBSERVER" in os.environ \
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] check bitbake server-only port is a number
2016-10-07 21:46 [PATCH] check bitbake server-only port is a number Benjamin Esquivel
@ 2016-10-08 6:49 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2016-10-08 6:49 UTC (permalink / raw)
To: Benjamin Esquivel, openembedded-core
On Fri, 2016-10-07 at 16:46 -0500, Benjamin Esquivel wrote:
> either using the memres script or the bitbake call with --server-only
> if the port is a string instead of a number then the process hangs
> indefinitely causing a loop that never ends.
>
> adding a check at the beginning for the port being a number otherwise
> end prematurely.
>
> [YOCTO#10397]
>
> Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
> ---
> bitbake/lib/bb/main.py | 7 +++++++
> 1 file changed, 7 insertions(+)
bitbake patches should go to the bitbake list. I've queued this anyway
since I don't like indefinite hangs. I also had to tweak the commit
message (e.g. a main: prefix to the shortlog).
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-08 6:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-07 21:46 [PATCH] check bitbake server-only port is a number Benjamin Esquivel
2016-10-08 6:49 ` Richard Purdie
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.