diff options
| -rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builder.py | 19 | ||||
| -rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 17 |
2 files changed, 23 insertions, 13 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py index 5e90219b3c..3f26baceca 100755 --- a/bitbake/lib/bb/ui/crumbs/builder.py +++ b/bitbake/lib/bb/ui/crumbs/builder.py | |||
| @@ -395,16 +395,21 @@ class Builder(gtk.Window): | |||
| 395 | 395 | ||
| 396 | def generate_image_async(self): | 396 | def generate_image_async(self): |
| 397 | self.switch_page(self.IMAGE_GENERATING) | 397 | self.switch_page(self.IMAGE_GENERATING) |
| 398 | self.handler.reset_build() | ||
| 398 | # Build image | 399 | # Build image |
| 399 | self.set_user_config() | 400 | self.set_user_config() |
| 400 | packages = self.package_model.get_selected_packages() | ||
| 401 | toolchain_packages = [] | 401 | toolchain_packages = [] |
| 402 | if self.configuration.toolchain_build: | 402 | if self.configuration.toolchain_build: |
| 403 | toolchain_packages = self.package_model.get_selected_packages_toolchain() | 403 | toolchain_packages = self.package_model.get_selected_packages_toolchain() |
| 404 | self.handler.reset_build() | 404 | if self.configuration.selected_image == self.recipe_model.__dummy_image__: |
| 405 | self.handler.generate_image(packages, | 405 | packages = self.package_model.get_selected_packages() |
| 406 | self.hob_image, | 406 | image = self.hob_image |
| 407 | else: | ||
| 408 | packages = [] | ||
| 409 | image = self.configuration.selected_image | ||
| 410 | self.handler.generate_image(image, | ||
| 407 | self.hob_toolchain, | 411 | self.hob_toolchain, |
| 412 | packages, | ||
| 408 | toolchain_packages) | 413 | toolchain_packages) |
| 409 | 414 | ||
| 410 | def get_parameters_sync(self): | 415 | def get_parameters_sync(self): |
| @@ -690,7 +695,11 @@ class Builder(gtk.Window): | |||
| 690 | elif self.current_step == self.IMAGE_GENERATING: | 695 | elif self.current_step == self.IMAGE_GENERATING: |
| 691 | fraction = 1.0 | 696 | fraction = 1.0 |
| 692 | self.parameters.image_names = [] | 697 | self.parameters.image_names = [] |
| 693 | linkname = 'hob-image-' + self.configuration.curr_mach | 698 | selected_image = self.recipe_model.get_selected_image() |
| 699 | if selected_image == self.recipe_model.__dummy_image__: | ||
| 700 | linkname = 'hob-image-' + self.configuration.curr_mach | ||
| 701 | else: | ||
| 702 | linkname = selected_image + '-' + self.configuration.curr_mach | ||
| 694 | for image_type in self.parameters.image_types: | 703 | for image_type in self.parameters.image_types: |
| 695 | linkpath = self.parameters.image_addr + '/' + linkname + '.' + image_type | 704 | linkpath = self.parameters.image_addr + '/' + linkname + '.' + image_type |
| 696 | if os.path.exists(linkpath): | 705 | if os.path.exists(linkpath): |
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 292d9056b2..c297863705 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
| @@ -128,12 +128,13 @@ class HobHandler(gobject.GObject): | |||
| 128 | elif next_command == self.SUB_BUILD_IMAGE: | 128 | elif next_command == self.SUB_BUILD_IMAGE: |
| 129 | self.clear_busy() | 129 | self.clear_busy() |
| 130 | self.building = True | 130 | self.building = True |
| 131 | targets = [self.hob_image] | 131 | targets = [self.image] |
| 132 | self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""]) | 132 | if self.package_queue: |
| 133 | self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)]) | 133 | self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""]) |
| 134 | self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)]) | ||
| 134 | if self.toolchain_packages: | 135 | if self.toolchain_packages: |
| 135 | self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)]) | 136 | self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)]) |
| 136 | targets.append(self.hob_toolchain) | 137 | targets.append(self.toolchain) |
| 137 | self.server.runCommand(["buildTargets", targets, "build"]) | 138 | self.server.runCommand(["buildTargets", targets, "build"]) |
| 138 | 139 | ||
| 139 | def handle_event(self, event): | 140 | def handle_event(self, event): |
| @@ -352,10 +353,10 @@ class HobHandler(gobject.GObject): | |||
| 352 | self.commands_async.append(self.SUB_BUILD_RECIPES) | 353 | self.commands_async.append(self.SUB_BUILD_RECIPES) |
| 353 | self.run_next_command(self.GENERATE_PACKAGES) | 354 | self.run_next_command(self.GENERATE_PACKAGES) |
| 354 | 355 | ||
| 355 | def generate_image(self, tgts, hob_image, hob_toolchain, toolchain_packages=[]): | 356 | def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[]): |
| 356 | self.package_queue = tgts | 357 | self.image = image |
| 357 | self.hob_image = hob_image | 358 | self.toolchain = toolchain |
| 358 | self.hob_toolchain = hob_toolchain | 359 | self.package_queue = image_packages |
| 359 | self.toolchain_packages = toolchain_packages | 360 | self.toolchain_packages = toolchain_packages |
| 360 | self.commands_async.append(self.SUB_PARSE_CONFIG) | 361 | self.commands_async.append(self.SUB_PARSE_CONFIG) |
| 361 | self.commands_async.append(self.SUB_BUILD_IMAGE) | 362 | self.commands_async.append(self.SUB_BUILD_IMAGE) |
