summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/prserv/serv.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py
index 5567c6f574..d8bdf31ba9 100644
--- a/bitbake/lib/prserv/serv.py
+++ b/bitbake/lib/prserv/serv.py
@@ -268,10 +268,17 @@ def is_local_special(host, port):
268 268
269def auto_start(d): 269def auto_start(d):
270 global singleton 270 global singleton
271 if (not d.getVar('PRSERV_HOST', True)) or (not d.getVar('PRSERV_PORT', True)): 271
272 host_params = filter(None, (d.getVar('PRSERV_HOST', True) or '').split(':'))
273 if not host_params:
274 return True
275
276 if len(host_params) != 2:
277 logger.critical('\n'.join(['PRSERV_HOST: incorrect format',
278 'Usage: PRSERV_HOST = "<hostname>:<port>"']))
272 return True 279 return True
273 280
274 if is_local_special(d.getVar('PRSERV_HOST', True), int(d.getVar('PRSERV_PORT', True))) and not singleton: 281 if is_local_special(host_params[0], int(host_params[1])) and not singleton:
275 import bb.utils 282 import bb.utils
276 cachedir = (d.getVar("PERSISTENT_DIR", True) or d.getVar("CACHE", True)) 283 cachedir = (d.getVar("PERSISTENT_DIR", True) or d.getVar("CACHE", True))
277 if not cachedir: 284 if not cachedir:
@@ -285,8 +292,8 @@ def auto_start(d):
285 if singleton: 292 if singleton:
286 host, port = singleton.getinfo() 293 host, port = singleton.getinfo()
287 else: 294 else:
288 host = d.getVar('PRSERV_HOST', True) 295 host = host_params[0]
289 port = int(d.getVar('PRSERV_PORT', True)) 296 port = int(host_params[1])
290 297
291 try: 298 try:
292 return PRServerConnection(host,port).ping() 299 return PRServerConnection(host,port).ping()