summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake8
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 1fac9feb24..e77266b4ba 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -197,6 +197,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
197 parser.add_option("", "--remote-server", help = "Connect to the specified server", 197 parser.add_option("", "--remote-server", help = "Connect to the specified server",
198 action = "store", dest = "remote_server", default = False) 198 action = "store", dest = "remote_server", default = False)
199 199
200 parser.add_option("", "--observe-only", help = "Connect to a server as an observing-only client",
201 action = "store_true", dest = "observe_only", default = False)
202
200 options, targets = parser.parse_args(sys.argv) 203 options, targets = parser.parse_args(sys.argv)
201 return options, targets[1:] 204 return options, targets[1:]
202 205
@@ -269,6 +272,9 @@ def main():
269 if configParams.remote_server and configParams.servertype != "xmlrpc": 272 if configParams.remote_server and configParams.servertype != "xmlrpc":
270 sys.exit("FATAL: If '--remote-server' is defined, we must set the servertype as 'xmlrpc'.\n") 273 sys.exit("FATAL: If '--remote-server' is defined, we must set the servertype as 'xmlrpc'.\n")
271 274
275 if configParams.observe_only and (not configParams.remote_server or configParams.bind):
276 sys.exit("FATAL: '--observe-only' can only be used by UI clients connecting to a server.\n")
277
272 if "BBDEBUG" in os.environ: 278 if "BBDEBUG" in os.environ:
273 level = int(os.environ["BBDEBUG"]) 279 level = int(os.environ["BBDEBUG"])
274 if level > configuration.debug: 280 if level > configuration.debug:
@@ -295,7 +301,7 @@ def main():
295 server = start_server(servermodule, configParams, configuration) 301 server = start_server(servermodule, configParams, configuration)
296 else: 302 else:
297 # we start a stub server that is actually a XMLRPClient to 303 # we start a stub server that is actually a XMLRPClient to
298 server = servermodule.BitBakeXMLRPCClient() 304 server = servermodule.BitBakeXMLRPCClient(configParams.observe_only)
299 server.saveConnectionDetails(configParams.remote_server) 305 server.saveConnectionDetails(configParams.remote_server)
300 306
301 logger.removeHandler(handler) 307 logger.removeHandler(handler)