diff options
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake-worker | 1 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/runqueue.py | 1 | ||||
-rw-r--r-- | bitbake/lib/prserv/serv.py | 11 |
4 files changed, 12 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker index 8edf8dd658..6580078aff 100755 --- a/bitbake/bin/bitbake-worker +++ b/bitbake/bin/bitbake-worker | |||
@@ -280,6 +280,7 @@ class BitbakeWorker(object): | |||
280 | bb.msg.loggerDefaultVerbose = self.workerdata["logdefaultverbose"] | 280 | bb.msg.loggerDefaultVerbose = self.workerdata["logdefaultverbose"] |
281 | bb.msg.loggerVerboseLogs = self.workerdata["logdefaultverboselogs"] | 281 | bb.msg.loggerVerboseLogs = self.workerdata["logdefaultverboselogs"] |
282 | bb.msg.loggerDefaultDomains = self.workerdata["logdefaultdomain"] | 282 | bb.msg.loggerDefaultDomains = self.workerdata["logdefaultdomain"] |
283 | self.data.setVar("PRSERV_HOST", self.workerdata["prhost"]) | ||
283 | 284 | ||
284 | def handle_ping(self, _): | 285 | def handle_ping(self, _): |
285 | workerlog_write("Handling ping\n") | 286 | workerlog_write("Handling ping\n") |
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 | |||
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 |