summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/cooker.py8
-rw-r--r--bitbake/lib/bb/cookerdata.py1
-rw-r--r--bitbake/lib/bb/server/xmlrpc.py7
3 files changed, 14 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index b36ed6fe36..7b10f80680 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -125,6 +125,14 @@ class BBCooker:
125 self.lock = bb.utils.lockfile(lockfile, False, False) 125 self.lock = bb.utils.lockfile(lockfile, False, False)
126 if not self.lock: 126 if not self.lock:
127 bb.fatal("Only one copy of bitbake should be run against a build directory") 127 bb.fatal("Only one copy of bitbake should be run against a build directory")
128 try:
129 self.lock.seek(0)
130 self.lock.truncate()
131 if len(configuration.interface) >= 2:
132 self.lock.write("%s:%s\n" % (configuration.interface[0], configuration.interface[1]));
133 self.lock.flush()
134 except:
135 pass
128 136
129 # TOSTOP must not be set or our children will hang when they output 137 # TOSTOP must not be set or our children will hang when they output
130 fd = sys.stdout.fileno() 138 fd = sys.stdout.fileno()
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index e640ed0f35..6200b0ebac 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -127,6 +127,7 @@ class CookerConfiguration(object):
127 self.dump_signatures = False 127 self.dump_signatures = False
128 self.dry_run = False 128 self.dry_run = False
129 self.tracking = False 129 self.tracking = False
130 self.interface = []
130 131
131 self.env = {} 132 self.env = {}
132 133
diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py
index 3a67ab0cf2..46d074a738 100644
--- a/bitbake/lib/bb/server/xmlrpc.py
+++ b/bitbake/lib/bb/server/xmlrpc.py
@@ -198,6 +198,11 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer):
198 Constructor 198 Constructor
199 """ 199 """
200 BaseImplServer.__init__(self) 200 BaseImplServer.__init__(self)
201 if (interface[1] == 0): # anonymous port, not getting reused
202 self.single_use = True
203 # Use auto port configuration
204 if (interface[1] == -1):
205 interface = (interface[0], 0)
201 SimpleXMLRPCServer.__init__(self, interface, 206 SimpleXMLRPCServer.__init__(self, interface,
202 requestHandler=BitBakeXMLRPCRequestHandler, 207 requestHandler=BitBakeXMLRPCRequestHandler,
203 logRequests=False, allow_none=True) 208 logRequests=False, allow_none=True)
@@ -208,8 +213,6 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer):
208 self.autoregister_all_functions(self.commands, "") 213 self.autoregister_all_functions(self.commands, "")
209 self.interface = interface 214 self.interface = interface
210 self.single_use = False 215 self.single_use = False
211 if (interface[1] == 0): # anonymous port, not getting reused
212 self.single_use = True
213 216
214 def addcooker(self, cooker): 217 def addcooker(self, cooker):
215 BaseImplServer.addcooker(self, cooker) 218 BaseImplServer.addcooker(self, cooker)