Skip to contentSkip to conversation

oe-init-build-env-memres: Fix automatic port usage

PATCH New Richard Purdie 1 participant 1 message Sep 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oe-init-build-env-memres: Fix automatic port usage

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]

oe-init-build-env-memres +4 -4
index 0007998..9b9e0f4 100755
@@ -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