summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin/bitbake')
-rwxr-xr-xbitbake/bin/bitbake17
1 files changed, 14 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 6da4980e5d..c06d4e8176 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -168,6 +168,8 @@ Default BBFILES are the .bb files in the current directory.""")
168 parser.add_option("", "--server-only", help = "Run bitbake without UI, the frontend can connect with bitbake server itself", 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) 169 action = "store_true", dest = "server_only", default = False)
170 170
171 parser.add_option("-B", "--bind", help = "The name/address for the bitbake server to bind to",
172 action = "store", dest = "bind", default = False)
171 options, args = parser.parse_args(sys.argv) 173 options, args = parser.parse_args(sys.argv)
172 174
173 configuration = BBConfiguration(options) 175 configuration = BBConfiguration(options)
@@ -189,8 +191,14 @@ Default BBFILES are the .bb files in the current directory.""")
189 sys.exit("FATAL: Invalid server type '%s' specified.\n" 191 sys.exit("FATAL: Invalid server type '%s' specified.\n"
190 "Valid interfaces: xmlrpc, process [default], none." % servertype) 192 "Valid interfaces: xmlrpc, process [default], none." % servertype)
191 193
192 if configuration.server_only and configuration.servertype != "xmlrpc": 194 if configuration.server_only:
193 sys.exit("FATAL: If '--server-only' is defined, we must set the servertype as 'xmlrpc'.\n") 195 if configuration.servertype != "xmlrpc":
196 sys.exit("FATAL: If '--server-only' is defined, we must set the servertype as 'xmlrpc'.\n")
197 if not configuration.bind:
198 sys.exit("FATAL: The '--server-only' option requires a name/address to bind to with the -B option.\n")
199
200 if configuration.bind and configuration.servertype != "xmlrpc":
201 sys.exit("FATAL: If '-B' or '--bind' is defined, we must set the servertype as 'xmlrpc'.\n")
194 202
195 # Save a logfile for cooker into the current working directory. When the 203 # Save a logfile for cooker into the current working directory. When the
196 # server is daemonized this logfile will be truncated. 204 # server is daemonized this logfile will be truncated.
@@ -212,8 +220,11 @@ Default BBFILES are the .bb files in the current directory.""")
212 bb.utils.clean_environment() 220 bb.utils.clean_environment()
213 221
214 server = server.BitBakeServer() 222 server = server.BitBakeServer()
223 if configuration.bind:
224 server.initServer((configuration.bind, 0))
225 else:
226 server.initServer()
215 227
216 server.initServer()
217 idle = server.getServerIdleCB() 228 idle = server.getServerIdleCB()
218 229
219 cooker = bb.cooker.BBCooker(configuration, idle, initialenv) 230 cooker = bb.cooker.BBCooker(configuration, idle, initialenv)