bitbake: bitbake.lock: Add host:port to bitbake.lock for memres server
authorJason Wessel <jason.wessel@windriver.com>
Mon, 25 Nov 2013 21:21:26 +0000 (15:21 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 2 Dec 2013 17:33:14 +0000 (17:33 +0000)
commit6e1d150f0546264067146dbebd5dc34b15a3771c
tree1605724e56d1a10719f483a30986dfe0bfdebbde
parentc3bb3f29d1c6dbcd0cccc662e6abb0570da119c4
bitbake: bitbake.lock: Add host:port to bitbake.lock for memres server

The idea is to build on the --status-only option for bitbake and
expose a mechanism where the oe init scripts can easily switch between
memres server and the non-memres server.

In the case of the standard oe init script the following
can shut down the server:

if [ -z "$BBSERVER" ] && [ -f bitbake.lock ] ; then
    grep ":" bitbake.lock > /dev/null && BBSERVER=`cat bitbake.lock` bitbake --status-only
    if [ $? = 0 ] ; then
       echo "Shutting down bitbake memory resident server with bitbake -m"
       BBSERVER=`cat bitbake.lock` bitbake -m
    fi
fi

A similar function can be used to automatically detect if the server
is already running for the oe memres init script.  This new
functionality allows for the memres init script to be started in a new
shell and connect up to an alaready running server without seeing the
error of trying to start the server multiple times.

(Bitbake rev: b1803958de8d7c3c3279841e38604a08dc2316cc)

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/bin/bitbake
bitbake/lib/bb/cooker.py
bitbake/lib/bb/cookerdata.py
bitbake/lib/bb/server/xmlrpc.py