summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake15
1 files changed, 14 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 50971a8d8f..cca2b8d29b 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -190,6 +190,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
190 parser.add_option("", "--observe-only", help = "Connect to a server as an observing-only client.", 190 parser.add_option("", "--observe-only", help = "Connect to a server as an observing-only client.",
191 action = "store_true", dest = "observe_only", default = False) 191 action = "store_true", dest = "observe_only", default = False)
192 192
193 parser.add_option("", "--status-only", help = "Check the status of the remote bitbake server.",
194 action = "store_true", dest = "status_only", default = False)
195
193 options, targets = parser.parse_args(sys.argv) 196 options, targets = parser.parse_args(sys.argv)
194 197
195 # some environmental variables set also configuration options 198 # some environmental variables set also configuration options
@@ -284,7 +287,9 @@ def main():
284 287
285 # Ensure logging messages get sent to the UI as events 288 # Ensure logging messages get sent to the UI as events
286 handler = bb.event.LogHandler() 289 handler = bb.event.LogHandler()
287 logger.addHandler(handler) 290 if not configParams.status_only:
291 # In status only mode there are no logs and no UI
292 logger.addHandler(handler)
288 293
289 # Clear away any spurious environment variables while we stoke up the cooker 294 # Clear away any spurious environment variables while we stoke up the cooker
290 cleanedvars = bb.utils.clean_environment() 295 cleanedvars = bb.utils.clean_environment()
@@ -302,6 +307,14 @@ def main():
302 # Collect the feature set for the UI 307 # Collect the feature set for the UI
303 featureset = getattr(ui_module, "featureSet", []) 308 featureset = getattr(ui_module, "featureSet", [])
304 309
310 if configParams.status_only:
311 try:
312 server_connection = server.establishConnection(featureset)
313 except:
314 sys.exit(1)
315 server_connection.terminate()
316 sys.exit(0)
317
305 # Setup a connection to the server (cooker) 318 # Setup a connection to the server (cooker)
306 server_connection = server.establishConnection(featureset) 319 server_connection = server.establishConnection(featureset)
307 320