From d71059c86a8160f39af6ddfdd30c86835f4eb959 Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Mon, 25 Nov 2013 15:21:28 -0600 Subject: oe-init-build-env: Allow startup with and without memres Use the bitbake --status-only and the fact that bitbake.lock will contain the host name and port to determine when to activate or shutdown the stay resident bitbake server. This allows a end developer to cleanly switch between the two ways to use bitbake as well as enter the memres bitbake server from multiple shells without starting the server if it is already running. Signed-off-by: Jason Wessel Signed-off-by: Richard Purdie --- oe-init-build-env | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'oe-init-build-env') diff --git a/oe-init-build-env b/oe-init-build-env index de9692fe44..8ef32f3d55 100755 --- a/oe-init-build-env +++ b/oe-init-build-env @@ -47,3 +47,12 @@ else unset BBPATH fi +# Shutdown any bitbake server if the BBSERVER variable is not set +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 + -- cgit 1.2.3-korg