summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorDongxiao Xu <dongxiao.xu@intel.com>2012-04-13 01:14:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-14 14:43:24 +0100
commit276b86509ba29046828d283f15ae44ae0850d1d0 (patch)
treee88daf3000c55c2c366400d4c85bc6268dcbbd38 /bitbake/lib/bb/ui
parentfdb2027e6de6291486b36913d69ff49b769e2bb6 (diff)
downloadpoky-276b86509ba29046828d283f15ae44ae0850d1d0.tar.gz
Hob: Use BB_DEFAULT_TASK as build task instead of hardcoded "build"
Originally we use hardcoded "build" as the default task. This commit fixes it by using BB_DEFAULT_TASK. This fixes [YOCTO #2283] (Bitbake rev: 7540f8d446345559ea9b47f4ff71d203ffdfaf8d) Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py10
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobeventhandler.py12
2 files changed, 15 insertions, 7 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 3f26baceca..de9685dd26 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -71,6 +71,8 @@ class Configuration:
71 71
72 self.user_selected_packages = [] 72 self.user_selected_packages = []
73 73
74 self.default_task = params["default_task"]
75
74 # proxy settings 76 # proxy settings
75 self.all_proxy = params["all_proxy"] 77 self.all_proxy = params["all_proxy"]
76 self.http_proxy = params["http_proxy"] 78 self.http_proxy = params["http_proxy"]
@@ -105,6 +107,7 @@ class Configuration:
105 self.tune_pkgarch = params["tune_pkgarch"] 107 self.tune_pkgarch = params["tune_pkgarch"]
106 # bblayers.conf 108 # bblayers.conf
107 self.layers = params["layer"].split() 109 self.layers = params["layer"].split()
110 self.default_task = params["default_task"]
108 111
109 def load(self, template): 112 def load(self, template):
110 self.curr_mach = template.getVar("MACHINE") 113 self.curr_mach = template.getVar("MACHINE")
@@ -383,7 +386,7 @@ class Builder(gtk.Window):
383 _, all_recipes = self.recipe_model.get_selected_recipes() 386 _, all_recipes = self.recipe_model.get_selected_recipes()
384 self.set_user_config() 387 self.set_user_config()
385 self.handler.reset_build() 388 self.handler.reset_build()
386 self.handler.generate_packages(all_recipes) 389 self.handler.generate_packages(all_recipes, self.configuration.default_task)
387 390
388 def fast_generate_image_async(self): 391 def fast_generate_image_async(self):
389 self.switch_page(self.FAST_IMAGE_GENERATING) 392 self.switch_page(self.FAST_IMAGE_GENERATING)
@@ -391,7 +394,7 @@ class Builder(gtk.Window):
391 _, all_recipes = self.recipe_model.get_selected_recipes() 394 _, all_recipes = self.recipe_model.get_selected_recipes()
392 self.set_user_config() 395 self.set_user_config()
393 self.handler.reset_build() 396 self.handler.reset_build()
394 self.handler.generate_packages(all_recipes) 397 self.handler.generate_packages(all_recipes, self.configuration.default_task)
395 398
396 def generate_image_async(self): 399 def generate_image_async(self):
397 self.switch_page(self.IMAGE_GENERATING) 400 self.switch_page(self.IMAGE_GENERATING)
@@ -410,7 +413,8 @@ class Builder(gtk.Window):
410 self.handler.generate_image(image, 413 self.handler.generate_image(image,
411 self.hob_toolchain, 414 self.hob_toolchain,
412 packages, 415 packages,
413 toolchain_packages) 416 toolchain_packages,
417 self.configuration.default_task)
414 418
415 def get_parameters_sync(self): 419 def get_parameters_sync(self):
416 return self.handler.get_parameters() 420 return self.handler.get_parameters()
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index c297863705..17d3fe4a05 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -123,7 +123,7 @@ class HobHandler(gobject.GObject):
123 elif next_command == self.SUB_BUILD_RECIPES: 123 elif next_command == self.SUB_BUILD_RECIPES:
124 self.clear_busy() 124 self.clear_busy()
125 self.building = True 125 self.building = True
126 self.server.runCommand(["buildTargets", self.recipe_queue, "build"]) 126 self.server.runCommand(["buildTargets", self.recipe_queue, self.default_task])
127 self.recipe_queue = [] 127 self.recipe_queue = []
128 elif next_command == self.SUB_BUILD_IMAGE: 128 elif next_command == self.SUB_BUILD_IMAGE:
129 self.clear_busy() 129 self.clear_busy()
@@ -135,7 +135,7 @@ class HobHandler(gobject.GObject):
135 if self.toolchain_packages: 135 if self.toolchain_packages:
136 self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)]) 136 self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)])
137 targets.append(self.toolchain) 137 targets.append(self.toolchain)
138 self.server.runCommand(["buildTargets", targets, "build"]) 138 self.server.runCommand(["buildTargets", targets, self.default_task])
139 139
140 def handle_event(self, event): 140 def handle_event(self, event):
141 if not event: 141 if not event:
@@ -345,19 +345,21 @@ class HobHandler(gobject.GObject):
345 self.commands_async.append(self.SUB_GNERATE_TGTS) 345 self.commands_async.append(self.SUB_GNERATE_TGTS)
346 self.run_next_command(self.GENERATE_RECIPES) 346 self.run_next_command(self.GENERATE_RECIPES)
347 347
348 def generate_packages(self, tgts): 348 def generate_packages(self, tgts, default_task="build"):
349 targets = [] 349 targets = []
350 targets.extend(tgts) 350 targets.extend(tgts)
351 self.recipe_queue = targets 351 self.recipe_queue = targets
352 self.default_task = default_task
352 self.commands_async.append(self.SUB_PARSE_CONFIG) 353 self.commands_async.append(self.SUB_PARSE_CONFIG)
353 self.commands_async.append(self.SUB_BUILD_RECIPES) 354 self.commands_async.append(self.SUB_BUILD_RECIPES)
354 self.run_next_command(self.GENERATE_PACKAGES) 355 self.run_next_command(self.GENERATE_PACKAGES)
355 356
356 def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[]): 357 def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[], default_task="build"):
357 self.image = image 358 self.image = image
358 self.toolchain = toolchain 359 self.toolchain = toolchain
359 self.package_queue = image_packages 360 self.package_queue = image_packages
360 self.toolchain_packages = toolchain_packages 361 self.toolchain_packages = toolchain_packages
362 self.default_task = default_task
361 self.commands_async.append(self.SUB_PARSE_CONFIG) 363 self.commands_async.append(self.SUB_PARSE_CONFIG)
362 self.commands_async.append(self.SUB_BUILD_IMAGE) 364 self.commands_async.append(self.SUB_BUILD_IMAGE)
363 self.run_next_command(self.GENERATE_IMAGE) 365 self.run_next_command(self.GENERATE_IMAGE)
@@ -495,6 +497,8 @@ class HobHandler(gobject.GObject):
495 params["bb_version"] = self.server.runCommand(["getVariable", "BB_MIN_VERSION"]) or "" 497 params["bb_version"] = self.server.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
496 params["tune_arch"] = self.server.runCommand(["getVariable", "TUNE_ARCH"]) or "" 498 params["tune_arch"] = self.server.runCommand(["getVariable", "TUNE_ARCH"]) or ""
497 499
500 params["default_task"] = self.server.runCommand(["getVariable", "BB_DEFAULT_TASK"]) or "build"
501
498 params["git_proxy_host"] = self.server.runCommand(["getVariable", "GIT_PROXY_HOST"]) or "" 502 params["git_proxy_host"] = self.server.runCommand(["getVariable", "GIT_PROXY_HOST"]) or ""
499 params["git_proxy_port"] = self.server.runCommand(["getVariable", "GIT_PROXY_PORT"]) or "" 503 params["git_proxy_port"] = self.server.runCommand(["getVariable", "GIT_PROXY_PORT"]) or ""
500 504