summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2013-11-25 15:21:25 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-02 11:28:27 +0000
commit0bea372b0fe6d77b2f6b742214f97a0db79e3990 (patch)
treef71ce80e96d8858b40c250f5f229875714979680 /bitbake
parent72e650d97cdf9dcdafc5000b7b784798dbb634c8 (diff)
downloadast2050-yocto-poky-0bea372b0fe6d77b2f6b742214f97a0db79e3990.zip
ast2050-yocto-poky-0bea372b0fe6d77b2f6b742214f97a0db79e3990.tar.gz
bitbake: bitbake: Add --status-only option
The --status-only option is purely to check the health of the server. The idea is to use it from the oe environment script so as to know if the server needs to be started or not. (Bitbake rev: 46b26ef5c27bfa9c91680f494f02750305b8098c) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/bin/bitbake15
1 files changed, 14 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 50971a8..cca2b8d 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -190,6 +190,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
parser.add_option("", "--observe-only", help = "Connect to a server as an observing-only client.",
action = "store_true", dest = "observe_only", default = False)
+ parser.add_option("", "--status-only", help = "Check the status of the remote bitbake server.",
+ action = "store_true", dest = "status_only", default = False)
+
options, targets = parser.parse_args(sys.argv)
# some environmental variables set also configuration options
@@ -284,7 +287,9 @@ def main():
# Ensure logging messages get sent to the UI as events
handler = bb.event.LogHandler()
- logger.addHandler(handler)
+ if not configParams.status_only:
+ # In status only mode there are no logs and no UI
+ logger.addHandler(handler)
# Clear away any spurious environment variables while we stoke up the cooker
cleanedvars = bb.utils.clean_environment()
@@ -302,6 +307,14 @@ def main():
# Collect the feature set for the UI
featureset = getattr(ui_module, "featureSet", [])
+ if configParams.status_only:
+ try:
+ server_connection = server.establishConnection(featureset)
+ except:
+ sys.exit(1)
+ server_connection.terminate()
+ sys.exit(0)
+
# Setup a connection to the server (cooker)
server_connection = server.establishConnection(featureset)
OpenPOWER on IntegriCloud