diff options
| -rwxr-xr-x | bitbake/bin/bitbake | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 9eb558b9ec..c2e682221d 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
| @@ -165,6 +165,9 @@ Default BBFILES are the .bb files in the current directory.""") | |||
| 165 | parser.add_option("", "--revisions-changed", help = "Set the exit code depending on whether upstream floating revisions have changed or not", | 165 | parser.add_option("", "--revisions-changed", help = "Set the exit code depending on whether upstream floating revisions have changed or not", |
| 166 | action = "store_true", dest = "revisions_changed", default = False) | 166 | action = "store_true", dest = "revisions_changed", default = False) |
| 167 | 167 | ||
| 168 | parser.add_option("", "--server-only", help = "Run bitbake without UI, the frontend can connect with bitbake server itself", | ||
| 169 | action = "store_true", dest = "server_only", default = False) | ||
| 170 | |||
| 168 | options, args = parser.parse_args(sys.argv) | 171 | options, args = parser.parse_args(sys.argv) |
| 169 | 172 | ||
| 170 | configuration = BBConfiguration(options) | 173 | configuration = BBConfiguration(options) |
| @@ -186,6 +189,9 @@ Default BBFILES are the .bb files in the current directory.""") | |||
| 186 | sys.exit("FATAL: Invalid server type '%s' specified.\n" | 189 | sys.exit("FATAL: Invalid server type '%s' specified.\n" |
| 187 | "Valid interfaces: xmlrpc, process [default], none." % servertype) | 190 | "Valid interfaces: xmlrpc, process [default], none." % servertype) |
| 188 | 191 | ||
| 192 | if configuration.server_only and configuration.servertype != "xmlrpc": | ||
| 193 | sys.exit("FATAL: If '--server-only' is defined, we must set the servertype as 'xmlrpc'.\n") | ||
| 194 | |||
| 189 | # Save a logfile for cooker into the current working directory. When the | 195 | # Save a logfile for cooker into the current working directory. When the |
| 190 | # server is daemonized this logfile will be truncated. | 196 | # server is daemonized this logfile will be truncated. |
| 191 | cooker_logfile = os.path.join(os.getcwd(), "cooker.log") | 197 | cooker_logfile = os.path.join(os.getcwd(), "cooker.log") |
| @@ -222,14 +228,17 @@ Default BBFILES are the .bb files in the current directory.""") | |||
| 222 | 228 | ||
| 223 | logger.removeHandler(handler) | 229 | logger.removeHandler(handler) |
| 224 | 230 | ||
| 225 | # Setup a connection to the server (cooker) | 231 | if not configuration.server_only: |
| 226 | server_connection = server.establishConnection() | 232 | # Setup a connection to the server (cooker) |
| 233 | server_connection = server.establishConnection() | ||
| 227 | 234 | ||
| 228 | try: | 235 | try: |
| 229 | return server.launchUI(ui_main, server_connection.connection, server_connection.events) | 236 | return server.launchUI(ui_main, server_connection.connection, server_connection.events) |
| 230 | finally: | 237 | finally: |
| 231 | bb.event.ui_queue = [] | 238 | bb.event.ui_queue = [] |
| 232 | server_connection.terminate() | 239 | server_connection.terminate() |
| 240 | else: | ||
| 241 | print("server address: %s, server port: %s" % (server.serverinfo.host, server.serverinfo.port)) | ||
| 233 | 242 | ||
| 234 | return 1 | 243 | return 1 |
| 235 | 244 | ||
