diff options
Diffstat (limited to 'bitbake/lib/prserv/serv.py')
-rw-r--r-- | bitbake/lib/prserv/serv.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/prserv/serv.py b/bitbake/lib/prserv/serv.py index d7ab9ee0d5..7f9331d13b 100644 --- a/bitbake/lib/prserv/serv.py +++ b/bitbake/lib/prserv/serv.py | |||
@@ -207,6 +207,9 @@ class PRServerConnection(): | |||
207 | def importone(self, version, pkgarch, checksum, value): | 207 | def importone(self, version, pkgarch, checksum, value): |
208 | return self.connection.importone(version, pkgarch, checksum, value) | 208 | return self.connection.importone(version, pkgarch, checksum, value) |
209 | 209 | ||
210 | def getinfo(self): | ||
211 | return self.host, self.port | ||
212 | |||
210 | def start_daemon(dbfile, host, port, logfile): | 213 | def start_daemon(dbfile, host, port, logfile): |
211 | pidfile = PIDPREFIX % (host, port) | 214 | pidfile = PIDPREFIX % (host, port) |
212 | try: | 215 | try: |
@@ -271,7 +274,7 @@ def auto_start(d): | |||
271 | 274 | ||
272 | host_params = filter(None, (d.getVar('PRSERV_HOST', True) or '').split(':')) | 275 | host_params = filter(None, (d.getVar('PRSERV_HOST', True) or '').split(':')) |
273 | if not host_params: | 276 | if not host_params: |
274 | return True | 277 | return None |
275 | 278 | ||
276 | if len(host_params) != 2: | 279 | if len(host_params) != 2: |
277 | logger.critical('\n'.join(['PRSERV_HOST: incorrect format', | 280 | logger.critical('\n'.join(['PRSERV_HOST: incorrect format', |
@@ -296,7 +299,11 @@ def auto_start(d): | |||
296 | port = int(host_params[1]) | 299 | port = int(host_params[1]) |
297 | 300 | ||
298 | try: | 301 | try: |
299 | return PRServerConnection(host,port).ping() | 302 | connection = PRServerConnection(host,port) |
303 | connection.ping() | ||
304 | realhost, realport = connection.getinfo() | ||
305 | return str(realhost) + ":" + str(realport) | ||
306 | |||
300 | except Exception: | 307 | except Exception: |
301 | logger.critical("PRservice %s:%d not available" % (host, port)) | 308 | logger.critical("PRservice %s:%d not available" % (host, port)) |
302 | raise PRServiceConfigError | 309 | raise PRServiceConfigError |