* [PATCH 1/4] Hob: A minor fix on tooltip
2012-04-14 10:42 [PATCH 0/4][PULL] Hob: Bug fixes Dongxiao Xu
@ 2012-04-14 10:42 ` Dongxiao Xu
2012-04-14 10:42 ` [PATCH 2/4] Hob: Save the original image name into template Dongxiao Xu
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Dongxiao Xu @ 2012-04-14 10:42 UTC (permalink / raw)
To: bitbake-devel
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/hig.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index 5cc8a59..322efc6 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -392,7 +392,10 @@ class AdvancedSettingDialog (CrumbsDialog):
j = 1
for image_type in self.image_types:
self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type)
- self.image_types_checkbuttons[image_type].set_tooltip_text("Build an %s image" % image_type)
+ article = ""
+ if image_type.startswith(("a", "e", "i", "o", "u")):
+ article = "n"
+ self.image_types_checkbuttons[image_type].set_tooltip_text("Build a%s %s image" % (article, image_type))
table.attach(self.image_types_checkbuttons[image_type], j, j + 4, i, i + 1)
if image_type in self.configuration.image_fstypes.split():
self.image_types_checkbuttons[image_type].set_active(True)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] Hob: Save the original image name into template
2012-04-14 10:42 [PATCH 0/4][PULL] Hob: Bug fixes Dongxiao Xu
2012-04-14 10:42 ` [PATCH 1/4] Hob: A minor fix on tooltip Dongxiao Xu
@ 2012-04-14 10:42 ` Dongxiao Xu
2012-04-14 10:42 ` [PATCH 3/4] Hob: Build selected image if not customized Dongxiao Xu
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Dongxiao Xu @ 2012-04-14 10:42 UTC (permalink / raw)
To: bitbake-devel
Previously we use the template file name as the image name. This commit
changes to use the original selected image into template file.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index f414bc7..5e90219 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -153,7 +153,7 @@ class Configuration:
self.cvs_proxy_host = template.getVar("CVS_PROXY_HOST")
self.cvs_proxy_port = template.getVar("CVS_PROXY_PORT")
- def save(self, template, filename):
+ def save(self, template):
# bblayers.conf
template.setVar("BBLAYERS", " ".join(self.layers))
# local.conf
@@ -175,7 +175,6 @@ class Configuration:
template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
template.setVar("IMAGE_FSTYPES", self.image_fstypes)
# image/recipes/packages
- self.selected_image = filename
template.setVar("__SELECTED_IMAGE__", self.selected_image)
template.setVar("DEPENDS", self.selected_recipes)
template.setVar("IMAGE_INSTALL", self.user_selected_packages)
@@ -447,7 +446,7 @@ class Builder(gtk.Window):
self.template = TemplateMgr()
self.template.open(filename, path)
- self.configuration.save(self.template, filename)
+ self.configuration.save(self.template)
self.template.save()
self.template.destroy()
@@ -627,10 +626,6 @@ class Builder(gtk.Window):
selected_recipes = self.configuration.selected_recipes[:]
selected_packages = self.configuration.selected_packages[:]
- self.recipe_model.image_list_append(selected_image,
- " ".join(selected_recipes),
- " ".join(selected_packages))
-
self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
self.image_configuration_page.update_image_desc(selected_image)
self.update_recipe_model(selected_image, selected_recipes)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] Hob: Build selected image if not customized
2012-04-14 10:42 [PATCH 0/4][PULL] Hob: Bug fixes Dongxiao Xu
2012-04-14 10:42 ` [PATCH 1/4] Hob: A minor fix on tooltip Dongxiao Xu
2012-04-14 10:42 ` [PATCH 2/4] Hob: Save the original image name into template Dongxiao Xu
@ 2012-04-14 10:42 ` Dongxiao Xu
2012-04-14 10:42 ` [PATCH 4/4] Hob: Use BB_DEFAULT_TASK as build task instead of hardcoded "build" Dongxiao Xu
2012-04-14 11:01 ` [PATCH 0/4][PULL] Hob: Bug fixes Xu, Dongxiao
4 siblings, 0 replies; 6+ messages in thread
From: Dongxiao Xu @ 2012-04-14 10:42 UTC (permalink / raw)
To: bitbake-devel
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]
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 19 ++++++++++++++-----
lib/bb/ui/crumbs/hobeventhandler.py | 17 +++++++++--------
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 5e90219..3f26bac 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -395,16 +395,21 @@ class Builder(gtk.Window):
def generate_image_async(self):
self.switch_page(self.IMAGE_GENERATING)
+ self.handler.reset_build()
# Build image
self.set_user_config()
- packages = self.package_model.get_selected_packages()
toolchain_packages = []
if self.configuration.toolchain_build:
toolchain_packages = self.package_model.get_selected_packages_toolchain()
- self.handler.reset_build()
- self.handler.generate_image(packages,
- self.hob_image,
+ if self.configuration.selected_image == self.recipe_model.__dummy_image__:
+ packages = self.package_model.get_selected_packages()
+ image = self.hob_image
+ else:
+ packages = []
+ image = self.configuration.selected_image
+ self.handler.generate_image(image,
self.hob_toolchain,
+ packages,
toolchain_packages)
def get_parameters_sync(self):
@@ -690,7 +695,11 @@ class Builder(gtk.Window):
elif self.current_step == self.IMAGE_GENERATING:
fraction = 1.0
self.parameters.image_names = []
- linkname = 'hob-image-' + self.configuration.curr_mach
+ selected_image = self.recipe_model.get_selected_image()
+ if selected_image == self.recipe_model.__dummy_image__:
+ linkname = 'hob-image-' + self.configuration.curr_mach
+ else:
+ linkname = selected_image + '-' + self.configuration.curr_mach
for image_type in self.parameters.image_types:
linkpath = self.parameters.image_addr + '/' + linkname + '.' + image_type
if os.path.exists(linkpath):
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 292d905..c297863 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/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)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] Hob: Use BB_DEFAULT_TASK as build task instead of hardcoded "build"
2012-04-14 10:42 [PATCH 0/4][PULL] Hob: Bug fixes Dongxiao Xu
` (2 preceding siblings ...)
2012-04-14 10:42 ` [PATCH 3/4] Hob: Build selected image if not customized Dongxiao Xu
@ 2012-04-14 10:42 ` Dongxiao Xu
2012-04-14 11:01 ` [PATCH 0/4][PULL] Hob: Bug fixes Xu, Dongxiao
4 siblings, 0 replies; 6+ messages in thread
From: Dongxiao Xu @ 2012-04-14 10:42 UTC (permalink / raw)
To: bitbake-devel
Originally we use hardcoded "build" as the default task. This commit
fixes it by using BB_DEFAULT_TASK.
This fixes [YOCTO #2283]
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
lib/bb/ui/crumbs/builder.py | 6 +++++-
lib/bb/ui/crumbs/hobeventhandler.py | 7 +++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 3f26bac..03a7caa 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -71,6 +71,8 @@ class Configuration:
self.user_selected_packages = []
+ self.default_task = params["default_task"]
+
# proxy settings
self.all_proxy = params["all_proxy"]
self.http_proxy = params["http_proxy"]
@@ -105,6 +107,7 @@ class Configuration:
self.tune_pkgarch = params["tune_pkgarch"]
# bblayers.conf
self.layers = params["layer"].split()
+ self.default_task = params["default_task"]
def load(self, template):
self.curr_mach = template.getVar("MACHINE")
@@ -410,7 +413,8 @@ class Builder(gtk.Window):
self.handler.generate_image(image,
self.hob_toolchain,
packages,
- toolchain_packages)
+ toolchain_packages,
+ self.configuration.default_task)
def get_parameters_sync(self):
return self.handler.get_parameters()
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index c297863..a46d838 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -135,7 +135,7 @@ class HobHandler(gobject.GObject):
if self.toolchain_packages:
self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)])
targets.append(self.toolchain)
- self.server.runCommand(["buildTargets", targets, "build"])
+ self.server.runCommand(["buildTargets", targets, self.default_task])
def handle_event(self, event):
if not event:
@@ -353,11 +353,12 @@ class HobHandler(gobject.GObject):
self.commands_async.append(self.SUB_BUILD_RECIPES)
self.run_next_command(self.GENERATE_PACKAGES)
- def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[]):
+ def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[], default_task="build"):
self.image = image
self.toolchain = toolchain
self.package_queue = image_packages
self.toolchain_packages = toolchain_packages
+ self.default_task = default_task
self.commands_async.append(self.SUB_PARSE_CONFIG)
self.commands_async.append(self.SUB_BUILD_IMAGE)
self.run_next_command(self.GENERATE_IMAGE)
@@ -495,6 +496,8 @@ class HobHandler(gobject.GObject):
params["bb_version"] = self.server.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
params["tune_arch"] = self.server.runCommand(["getVariable", "TUNE_ARCH"]) or ""
+ params["default_task"] = self.server.runCommand(["getVariable", "BB_DEFAULT_TASK"]) or "build"
+
params["git_proxy_host"] = self.server.runCommand(["getVariable", "GIT_PROXY_HOST"]) or ""
params["git_proxy_port"] = self.server.runCommand(["getVariable", "GIT_PROXY_PORT"]) or ""
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4][PULL] Hob: Bug fixes
2012-04-14 10:42 [PATCH 0/4][PULL] Hob: Bug fixes Dongxiao Xu
` (3 preceding siblings ...)
2012-04-14 10:42 ` [PATCH 4/4] Hob: Use BB_DEFAULT_TASK as build task instead of hardcoded "build" Dongxiao Xu
@ 2012-04-14 11:01 ` Xu, Dongxiao
4 siblings, 0 replies; 6+ messages in thread
From: Xu, Dongxiao @ 2012-04-14 11:01 UTC (permalink / raw)
To: bitbake-devel
On Sat, 2012-04-14 at 18:42 +0800, Dongxiao Xu wrote:
> Hi Richard,
>
> This pull request contains some Hob related bug fixes, please help to review and pull.
Please ignore this request because it missed some critical change, I
will send an update one.
Thanks,
Dongxiao
>
> Thanks,
> Dongxiao
>
> The following changes since commit 434fdb3913cc78e2e9cdeede4c4fa7f1c8ef8892:
>
> Hob: Added required packages for toolchain. (2012-04-13 12:00:12 +0100)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib dxu4/hob-bugfix
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/hob-bugfix
>
> Dongxiao Xu (4):
> Hob: A minor fix on tooltip
> Hob: Save the original image name into template
> Hob: Build selected image if not customized
> Hob: Use BB_DEFAULT_TASK as build task instead of hardcoded "build"
>
> lib/bb/ui/crumbs/builder.py | 34 +++++++++++++++++++++-------------
> lib/bb/ui/crumbs/hig.py | 5 ++++-
> lib/bb/ui/crumbs/hobeventhandler.py | 22 +++++++++++++---------
> 3 files changed, 38 insertions(+), 23 deletions(-)
>
^ permalink raw reply [flat|nested] 6+ messages in thread