From fdb2027e6de6291486b36913d69ff49b769e2bb6 Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Fri, 13 Apr 2012 01:04:50 +0800 Subject: Hob: Build selected image if not customized If user selected a base image and didn't customize it, Hob will still build the selected image instead of hob-image. This fixes [YOCTO #2253] (Bitbake rev: a74a6a033e66a0ae7b47c84d842bdd54066c69a1) Signed-off-by: Dongxiao Xu Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py') 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): elif next_command == self.SUB_BUILD_IMAGE: self.clear_busy() self.building = True - targets = [self.hob_image] - self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""]) - self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)]) + targets = [self.image] + if self.package_queue: + self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""]) + self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)]) if self.toolchain_packages: self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)]) - targets.append(self.hob_toolchain) + targets.append(self.toolchain) self.server.runCommand(["buildTargets", targets, "build"]) def handle_event(self, event): @@ -352,10 +353,10 @@ class HobHandler(gobject.GObject): self.commands_async.append(self.SUB_BUILD_RECIPES) self.run_next_command(self.GENERATE_PACKAGES) - def generate_image(self, tgts, hob_image, hob_toolchain, toolchain_packages=[]): - self.package_queue = tgts - self.hob_image = hob_image - self.hob_toolchain = hob_toolchain + def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[]): + self.image = image + self.toolchain = toolchain + self.package_queue = image_packages self.toolchain_packages = toolchain_packages self.commands_async.append(self.SUB_PARSE_CONFIG) self.commands_async.append(self.SUB_BUILD_IMAGE) -- cgit v1.2.3-54-g00ecf