diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-08 09:34:12 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-08 11:37:26 +0100 |
commit | cd3c4292e7ccc8934f229fcf010f8615398b87b5 (patch) | |
tree | 0c9cbf81048e4b44bc613f78cd6d59f0d9400b2e /bitbake/lib/bb/cooker.py | |
parent | e386fe4542865119ae7e1574e260c037e926239e (diff) | |
download | poky-cd3c4292e7ccc8934f229fcf010f8615398b87b5.tar.gz |
bitbake: Cleanup bitbake server init process to be clearer to follow
Create a standard format server class instance with method calls
for each step in the server setup. There should be enough hooks
for each of the different server types.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 8379d0caf1..94495e1399 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -63,12 +63,11 @@ class BBCooker: | |||
63 | Manages one bitbake build run | 63 | Manages one bitbake build run |
64 | """ | 64 | """ |
65 | 65 | ||
66 | def __init__(self, configuration, server): | 66 | def __init__(self, configuration, server_registration_cb): |
67 | self.status = None | 67 | self.status = None |
68 | self.appendlist = {} | 68 | self.appendlist = {} |
69 | 69 | ||
70 | if server: | 70 | self.server_registration_cb = server_registration_cb |
71 | self.server = server.BitBakeServer(self) | ||
72 | 71 | ||
73 | self.configuration = configuration | 72 | self.configuration = configuration |
74 | 73 | ||
@@ -109,7 +108,7 @@ class BBCooker: | |||
109 | 108 | ||
110 | self.configuration.data = bb.data.init() | 109 | self.configuration.data = bb.data.init() |
111 | 110 | ||
112 | if not server: | 111 | if not self.server_registration_cb: |
113 | bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data) | 112 | bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data) |
114 | 113 | ||
115 | bb.data.inheritFromOS(self.configuration.data) | 114 | bb.data.inheritFromOS(self.configuration.data) |
@@ -831,7 +830,7 @@ class BBCooker: | |||
831 | return True | 830 | return True |
832 | return retval | 831 | return retval |
833 | 832 | ||
834 | self.server.register_idle_function(buildFileIdle, rq) | 833 | self.server_registration_cb(buildFileIdle, rq) |
835 | 834 | ||
836 | def buildTargets(self, targets, task): | 835 | def buildTargets(self, targets, task): |
837 | """ | 836 | """ |
@@ -890,7 +889,7 @@ class BBCooker: | |||
890 | 889 | ||
891 | rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist) | 890 | rq = bb.runqueue.RunQueue(self, self.configuration.data, self.status, taskdata, runlist) |
892 | 891 | ||
893 | self.server.register_idle_function(buildTargetsIdle, rq) | 892 | self.server_registration_cb(buildTargetsIdle, rq) |
894 | 893 | ||
895 | def updateCache(self): | 894 | def updateCache(self): |
896 | if self.state == state.running: | 895 | if self.state == state.running: |