[oe-commits] [bitbake] branch master-next updated: main: Check bitbake server-only port is a number

git at git.openembedded.org git at git.openembedded.org
Sat Oct 8 06:49:34 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

The following commit(s) were added to refs/heads/master-next by this push:
       new  35927a9   main: Check bitbake server-only port is a number
35927a9 is described below

commit 35927a98daeeb854ef5782e900206af6cd96b3d7
Author: Benjamin Esquivel <benjamin.esquivel at linux.intel.com>
AuthorDate: Fri Oct 7 16:46:26 2016 -0500

    main: Check bitbake server-only port is a number
    
    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.
    
    Add a check at the beginning for the port being a number otherwise
    show an error message and exit cleanly.
    
    [YOCTO #10397]
    
    Signed-off-by: Benjamin Esquivel <benjamin.esquivel at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/main.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/bb/main.py b/lib/bb/main.py
index 7f7d87b..f2f59f6 100755
--- a/lib/bb/main.py
+++ b/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 \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list