]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oe-init-build-env-memres: Fix automatic port usage
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Sep 2014 14:56:31 +0000 (15:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Sep 2014 18:59:44 +0000 (19:59 +0100)
The use of an automatic port wasn't working correctly since the server
was never getting started when port == -1. This fixes things so the
server is started when port is not specified (i.e. automatic) ensuring
this happens before BBSERVER is set.

[YOCTO #6563]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oe-init-build-env-memres

index 00079989dc600319b88035b003e3cf05e90edc76..9b9e0f44b009a16f6ca9d64df396024c003edcc7 100755 (executable)
@@ -60,14 +60,14 @@ if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then
     res=$?
 fi
 
+if [ $res != 0 ] ; then
+    bitbake --server-only -t xmlrpc -B localhost:$port
+fi
+
 if [ $port = -1 ] ; then
     export BBSERVER=localhost:-1
     echo "Bitbake server started on demand as needed, use bitbake -m to shut it down"
 else
-    if [ $res != 0 ] ; then
-       bitbake --server-only -t xmlrpc -B localhost:$port
-    fi
-
     export BBSERVER=`cat bitbake.lock`
 
     if [ $res = 0 ] ; then