summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py2
-rw-r--r--bitbake/lib/bb/runqueue.py1
-rw-r--r--bitbake/lib/prserv/serv.py11
3 files changed, 11 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 77273dcb29..f375a6f581 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1177,7 +1177,7 @@ class BBCooker:
1177 # necessary from the data store. 1177 # necessary from the data store.
1178 #bb.utils.empty_environment() 1178 #bb.utils.empty_environment()
1179 try: 1179 try:
1180 prserv.serv.auto_start(self.data) 1180 self.prhost = prserv.serv.auto_start(self.data)
1181 except prserv.serv.PRServiceConfigError: 1181 except prserv.serv.PRServiceConfigError:
1182 bb.event.fire(CookerExit(), self.event_data) 1182 bb.event.fire(CookerExit(), self.event_data)
1183 return 1183 return
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 577f04a6c5..bd42538688 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -831,6 +831,7 @@ class RunQueue:
831 "logdefaultverbose" : bb.msg.loggerDefaultVerbose, 831 "logdefaultverbose" : bb.msg.loggerDefaultVerbose,
832 "logdefaultverboselogs" : bb.msg.loggerVerboseLogs, 832 "logdefaultverboselogs" : bb.msg.loggerVerboseLogs,
833 "logdefaultdomain" : bb.msg.loggerDefaultDomains, 833 "logdefaultdomain" : bb.msg.loggerDefaultDomains,
834 "prhost" : self.cooker.prhost,
834 } 835 }
835 836
836 worker.stdin.write("<cookerconfig>" + pickle.dumps(self.cooker.configuration) + "</cookerconfig>") 837 worker.stdin.write("<cookerconfig>" + pickle.dumps(self.cooker.configuration) + "</cookerconfig>")
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
210def start_daemon(dbfile, host, port, logfile): 213def 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