summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/none.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-11-13 21:23:54 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-11-13 21:23:54 +0800
commit05ba6fc7cb5a389737a238f312f4148e6b837d71 (patch)
tree7b0d8688095f94fd2010c63f0b0aadff301eccbf /bitbake/lib/bb/server/none.py
parent89929e1f283c8508c505c9731ad933880abf22a1 (diff)
downloadpoky-05ba6fc7cb5a389737a238f312f4148e6b837d71.tar.gz
bitbake: Rewrite profiling code so its functional for both none and xmlrpc backends
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/server/none.py')
-rw-r--r--bitbake/lib/bb/server/none.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/bitbake/lib/bb/server/none.py b/bitbake/lib/bb/server/none.py
index 14915d9737..38f713c519 100644
--- a/bitbake/lib/bb/server/none.py
+++ b/bitbake/lib/bb/server/none.py
@@ -109,9 +109,11 @@ class BitBakeServer():
109 # remove this when you're done with debugging 109 # remove this when you're done with debugging
110 # allow_reuse_address = True 110 # allow_reuse_address = True
111 111
112 def __init__(self, cooker): 112 def __init__(self, cooker, pre_serve, post_serve):
113 self._idlefuns = {} 113 self._idlefuns = {}
114 self.commands = BitBakeServerCommands(self, cooker) 114 self.commands = BitBakeServerCommands(self, cooker)
115 self.pre_serve = pre_serve
116 self.post_serve = post_serve
115 117
116 def register_idle_function(self, function, data): 118 def register_idle_function(self, function, data):
117 """Register a function to be called while the server is idle""" 119 """Register a function to be called while the server is idle"""
@@ -160,9 +162,17 @@ class BitbakeServerInfo():
160 self.commands = server.commands 162 self.commands = server.commands
161 163
162class BitBakeServerFork(): 164class BitBakeServerFork():
163 def __init__(self, serverinfo, command, logfile): 165 def __init__(self, cooker, server, serverinfo, logfile):
164 serverinfo.forkCommand = command
165 serverinfo.logfile = logfile 166 serverinfo.logfile = logfile
167 serverinfo.cooker = cooker
168 serverinfo.server = server
169
170class BitbakeUILauch():
171 def launch(self, serverinfo, uifunc, *args):
172 serverinfo.server.pre_serve()
173 ret = bb.cooker.server_main(serverinfo.cooker, uifunc, *args)
174 serverinfo.server.post_serve()
175 return ret
166 176
167class BitBakeServerConnection(): 177class BitBakeServerConnection():
168 def __init__(self, serverinfo): 178 def __init__(self, serverinfo):