diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2013-11-25 15:21:29 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-02 11:28:27 +0000 |
commit | 72e650d97cdf9dcdafc5000b7b784798dbb634c8 (patch) | |
tree | 7e67737c00d3e0fab4c99a73c769f82ea96b8e12 /oe-init-build-env-memres | |
parent | 644a1a27eca40a3c563e65e975b9b48a98a20a24 (diff) | |
download | poky-72e650d97cdf9dcdafc5000b7b784798dbb634c8.tar.gz |
oe-init-build-env-memres: Add auto port functionality
In order to run multiple bitbake memory resident servers on the same
machine they must each use different ports.
This patch works in conjuction with bitbake to make the auto port
selection and lazy server startup the default.
(From OE-Core rev: 9cf1ac73c4e35101a4f5c01a5e1c53f9d567bc58)
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'oe-init-build-env-memres')
-rwxr-xr-x | oe-init-build-env-memres | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/oe-init-build-env-memres b/oe-init-build-env-memres index 687d5e1225..00079989dc 100755 --- a/oe-init-build-env-memres +++ b/oe-init-build-env-memres | |||
@@ -26,8 +26,8 @@ | |||
26 | # to sourcing this script. | 26 | # to sourcing this script. |
27 | # | 27 | # |
28 | if [ -z "$1" ]; then | 28 | if [ -z "$1" ]; then |
29 | echo "No port specified, using 12345" | 29 | echo "No port specified, using dynamically selected port" |
30 | port=12345 | 30 | port=-1 |
31 | else | 31 | else |
32 | port=$1 | 32 | port=$1 |
33 | shift | 33 | shift |
@@ -60,15 +60,20 @@ if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then | |||
60 | res=$? | 60 | res=$? |
61 | fi | 61 | fi |
62 | 62 | ||
63 | if [ $res != 0 ] ; then | 63 | if [ $port = -1 ] ; then |
64 | bitbake --server-only -t xmlrpc -B localhost:$port | 64 | export BBSERVER=localhost:-1 |
65 | fi | 65 | echo "Bitbake server started on demand as needed, use bitbake -m to shut it down" |
66 | else | ||
67 | if [ $res != 0 ] ; then | ||
68 | bitbake --server-only -t xmlrpc -B localhost:$port | ||
69 | fi | ||
66 | 70 | ||
67 | export BBSERVER=`cat bitbake.lock` | 71 | export BBSERVER=`cat bitbake.lock` |
68 | 72 | ||
69 | if [ $res = 0 ] ; then | 73 | if [ $res = 0 ] ; then |
70 | echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down" | 74 | echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down" |
71 | else | 75 | else |
72 | echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down" | 76 | echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down" |
77 | fi | ||
78 | unset res | ||
73 | fi | 79 | fi |
74 | unset res | ||