diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2013-06-17 12:11:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-17 16:09:10 +0100 |
commit | baff2630b3c883c37bcc33d984453e14a0d4a206 (patch) | |
tree | 10c4d0775ddbb479a21888343faa777a8aa654ac | |
parent | f5cadbe005303a9fe022aa20a5aa12630b849b54 (diff) | |
download | poky-baff2630b3c883c37bcc33d984453e14a0d4a206.tar.gz |
bitbake: bitbake: read BBSERVER environement for remote server
This change allows bitbake to connect to a remote server
by reading the BBSERVER environment variable and effecting
the config. Basically a shortcut to the command line parameters.
(Bitbake rev: 81929f86c57ed0a4ad0cda7aaa820fceabaa61e9)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | bitbake/bin/bitbake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 0d6b3ae4c9..60c4b96c70 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -204,6 +204,12 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): | |||
204 | action = "store_true", dest = "observe_only", default = False) | 204 | action = "store_true", dest = "observe_only", default = False) |
205 | 205 | ||
206 | options, targets = parser.parse_args(sys.argv) | 206 | options, targets = parser.parse_args(sys.argv) |
207 | |||
208 | # some environmental variables set also configuration options | ||
209 | if "BBSERVER" in os.environ: | ||
210 | options.servertype = "xmlrpc" | ||
211 | options.remote_server = os.environ["BBSERVER"] | ||
212 | |||
207 | return options, targets[1:] | 213 | return options, targets[1:] |
208 | 214 | ||
209 | 215 | ||
@@ -268,6 +274,9 @@ def main(): | |||
268 | sys.exit("FATAL: If '--server-only' is defined, we must set the servertype as 'xmlrpc'.\n") | 274 | sys.exit("FATAL: If '--server-only' is defined, we must set the servertype as 'xmlrpc'.\n") |
269 | if not configParams.bind: | 275 | if not configParams.bind: |
270 | sys.exit("FATAL: The '--server-only' option requires a name/address to bind to with the -B option.\n") | 276 | sys.exit("FATAL: The '--server-only' option requires a name/address to bind to with the -B option.\n") |
277 | if configParams.remote_server: | ||
278 | sys.exit("FATAL: The '--server-only' option conflicts with the '--remote-server' option. %s\n" % | ||
279 | ("Please check your BBSERVER environment" if "BBSERVER" in os.environ else "" )) | ||
271 | 280 | ||
272 | if configParams.bind and configParams.servertype != "xmlrpc": | 281 | if configParams.bind and configParams.servertype != "xmlrpc": |
273 | sys.exit("FATAL: If '-B' or '--bind' is defined, we must set the servertype as 'xmlrpc'.\n") | 282 | sys.exit("FATAL: If '-B' or '--bind' is defined, we must set the servertype as 'xmlrpc'.\n") |