diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-03-23 15:38:42 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-25 12:23:31 +0100 |
commit | 5098c964c268b3a4a2fc397516a641a89e7a8928 (patch) | |
tree | c5f6d3922f65f73ffdb11862eef85e2687e7b99f /bitbake/lib/bb | |
parent | 9d3620fac8fd3f4b57cfac5fb7431416f63e2ea2 (diff) | |
download | poky-5098c964c268b3a4a2fc397516a641a89e7a8928.tar.gz |
Hob: Change the Hob initialization process
This change allows adding extra inherits before getting all the
parameters.
(Bitbake rev: eb993c0bad03718f9d3e133667cd0fefca23611a)
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 17 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 6 | ||||
-rwxr-xr-x | bitbake/lib/bb/ui/hob.py | 2 |
3 files changed, 16 insertions, 9 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 0faef9b0aa..d3484977fc 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
@@ -186,11 +186,6 @@ class Builder(gtk.Window): | |||
186 | 186 | ||
187 | self.template = None | 187 | self.template = None |
188 | 188 | ||
189 | # settings | ||
190 | params = self.handler.get_parameters() | ||
191 | self.configuration = Configuration(params) | ||
192 | self.parameters = Parameters(params) | ||
193 | |||
194 | # build step | 189 | # build step |
195 | self.current_step = None | 190 | self.current_step = None |
196 | self.previous_step = None | 191 | self.previous_step = None |
@@ -224,6 +219,10 @@ class Builder(gtk.Window): | |||
224 | self.handler.connect("command-succeeded", self.handler_command_succeeded_cb) | 219 | self.handler.connect("command-succeeded", self.handler_command_succeeded_cb) |
225 | self.handler.connect("command-failed", self.handler_command_failed_cb) | 220 | self.handler.connect("command-failed", self.handler_command_failed_cb) |
226 | 221 | ||
222 | self.handler.init_cooker() | ||
223 | self.handler.set_extra_inherit("image_types") | ||
224 | self.handler.parse_config() | ||
225 | |||
227 | self.switch_page(self.MACHINE_SELECTION) | 226 | self.switch_page(self.MACHINE_SELECTION) |
228 | 227 | ||
229 | def create_visual_elements(self): | 228 | def create_visual_elements(self): |
@@ -409,7 +408,13 @@ class Builder(gtk.Window): | |||
409 | self.parameters.all_layers = layers | 408 | self.parameters.all_layers = layers |
410 | 409 | ||
411 | def handler_command_succeeded_cb(self, handler, initcmd): | 410 | def handler_command_succeeded_cb(self, handler, initcmd): |
412 | if initcmd == self.handler.GENERATE_CONFIGURATION: | 411 | if initcmd == self.handler.PARSE_CONFIG: |
412 | # settings | ||
413 | params = self.handler.get_parameters() | ||
414 | self.configuration = Configuration(params) | ||
415 | self.parameters = Parameters(params) | ||
416 | self.handler.generate_configuration() | ||
417 | elif initcmd == self.handler.GENERATE_CONFIGURATION: | ||
413 | self.image_configuration_page.switch_machine_combo() | 418 | self.image_configuration_page.switch_machine_combo() |
414 | elif initcmd in [self.handler.GENERATE_RECIPES, | 419 | elif initcmd in [self.handler.GENERATE_RECIPES, |
415 | self.handler.GENERATE_PACKAGES, | 420 | self.handler.GENERATE_PACKAGES, |
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 8094d2dbad..308ef4da7e 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
@@ -62,7 +62,7 @@ class HobHandler(gobject.GObject): | |||
62 | (gobject.TYPE_PYOBJECT,)), | 62 | (gobject.TYPE_PYOBJECT,)), |
63 | } | 63 | } |
64 | 64 | ||
65 | (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5) | 65 | (PARSE_CONFIG, GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(6) |
66 | (SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(10) | 66 | (SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(10) |
67 | 67 | ||
68 | def __init__(self, server, recipe_model, package_model): | 68 | def __init__(self, server, recipe_model, package_model): |
@@ -246,6 +246,10 @@ class HobHandler(gobject.GObject): | |||
246 | def init_cooker(self): | 246 | def init_cooker(self): |
247 | self.server.runCommand(["initCooker"]) | 247 | self.server.runCommand(["initCooker"]) |
248 | 248 | ||
249 | def parse_config(self): | ||
250 | self.commands_async.append(self.SUB_PARSE_CONFIG) | ||
251 | self.run_next_command(self.PARSE_CONFIG) | ||
252 | |||
249 | def refresh_layers(self, bblayers): | 253 | def refresh_layers(self, bblayers): |
250 | self.init_cooker() | 254 | self.init_cooker() |
251 | self.set_bblayers(bblayers) | 255 | self.set_bblayers(bblayers) |
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index 7c147c4e1b..e72ab23e35 100755 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py | |||
@@ -58,8 +58,6 @@ def main (server = None, eventHandler = None): | |||
58 | hobHandler = HobHandler(server, recipe_model, package_model) | 58 | hobHandler = HobHandler(server, recipe_model, package_model) |
59 | builder = Builder(hobHandler, recipe_model, package_model) | 59 | builder = Builder(hobHandler, recipe_model, package_model) |
60 | 60 | ||
61 | hobHandler.generate_configuration() | ||
62 | |||
63 | # This timeout function regularly probes the event queue to find out if we | 61 | # This timeout function regularly probes the event queue to find out if we |
64 | # have any messages waiting for us. | 62 | # have any messages waiting for us. |
65 | gobject.timeout_add(10, event_handle_idle_func, eventHandler, hobHandler) | 63 | gobject.timeout_add(10, event_handle_idle_func, eventHandler, hobHandler) |