diff options
-rwxr-xr-x | oe-init-build-env | 9 | ||||
-rwxr-xr-x | oe-init-build-env-memres | 21 |
2 files changed, 27 insertions, 3 deletions
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 | |||
47 | unset BBPATH | 47 | unset BBPATH |
48 | fi | 48 | fi |
49 | 49 | ||
50 | # Shutdown any bitbake server if the BBSERVER variable is not set | ||
51 | if [ -z "$BBSERVER" ] && [ -f bitbake.lock ] ; then | ||
52 | grep ":" bitbake.lock > /dev/null && BBSERVER=`cat bitbake.lock` bitbake --status-only | ||
53 | if [ $? = 0 ] ; then | ||
54 | echo "Shutting down bitbake memory resident server with bitbake -m" | ||
55 | BBSERVER=`cat bitbake.lock` bitbake -m | ||
56 | fi | ||
57 | fi | ||
58 | |||
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres index 79b91b751a..687d5e1225 100755 --- a/oe-init-build-env-memres +++ b/oe-init-build-env-memres | |||
@@ -54,6 +54,21 @@ else | |||
54 | unset OEROOT | 54 | unset OEROOT |
55 | unset BBPATH | 55 | unset BBPATH |
56 | fi | 56 | fi |
57 | bitbake --server-only -t xmlrpc -B localhost:$port | 57 | res=1 |
58 | export BBSERVER=localhost:$port | 58 | if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then |
59 | echo "Bitbake server started on port $port, use bitbake -m to shut it down" | 59 | BBSERVER=`cat bitbake.lock` bitbake --status-only |
60 | res=$? | ||
61 | fi | ||
62 | |||
63 | if [ $res != 0 ] ; then | ||
64 | bitbake --server-only -t xmlrpc -B localhost:$port | ||
65 | fi | ||
66 | |||
67 | export BBSERVER=`cat bitbake.lock` | ||
68 | |||
69 | if [ $res = 0 ] ; then | ||
70 | echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down" | ||
71 | else | ||
72 | echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down" | ||
73 | fi | ||
74 | unset res | ||