Hob: Bug fixes: image_types, runqemu/deploy filter
Hi Richard,
This pull request is for Hob related bug fixes, please help to review and pull.
Thanks,
Dongxiao
The following changes since commit 1119495cbfe2bd1ed0da630dc63f5860c1be73d4:
lib/bb/ui/crumbs/builder: change dialogue title to Layers (2012-03-23 22:54:00 +0800)
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 (7):
Hob: Remove unnecessary PARSE_BBFILES command
Hob: Cleanup for hobeventhandler.py
Hob: Initial an empty label in recipeselectionpage.py
Hob: Change the Hob initialization process
Hob: Fix the workaround to get image types
Hob: Add a supported image type "vmdk"
Hob: runqemu and deployment functionality filter
lib/bb/ui/crumbs/builder.py | 20 +++++-- lib/bb/ui/crumbs/hobeventhandler.py | 90 ++++++++++++++----------------- lib/bb/ui/crumbs/hobwidget.py | 1 + lib/bb/ui/crumbs/imagedetailspage.py | 44 +++++++++++---- lib/bb/ui/crumbs/recipeselectionpage.py | 2 +- lib/bb/ui/hob.py | 2 - 6 files changed, 89 insertions(+), 70 deletions(-)
Signature · 1 line
1.7.4.1
PATCH 1/7 Hob: Remove unnecessary PARSE_BBFILES command
The ASYNC commands can automatically detect if BB file parsing is needed. Therefore remove this explicit parsing command.
--- lib/bb/ui/crumbs/hobeventhandler.py | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
lib/bb/ui/crumbs/hobeventhandler.py +1 -5
@@ -62,7 +62,7 @@ class HobHandler(gobject.GObject): (gobject.TYPE_PYOBJECT,)), } - (CFG_AVAIL_LAYERS, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDKMACH, FILES_MATCH_CLASS, PARSE_CONFIG, PARSE_BBFILES, GENERATE_TGTS, GENERATE_PACKAGEINFO, BUILD_TARGET_RECIPES, BUILD_TARGET_IMAGE, CMD_END) = range(13) + (CFG_AVAIL_LAYERS, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDKMACH, FILES_MATCH_CLASS, PARSE_CONFIG, GENERATE_TGTS, GENERATE_PACKAGEINFO, BUILD_TARGET_RECIPES, BUILD_TARGET_IMAGE, CMD_END) = range(12) (LAYERS_REFRESH, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5) def __init__(self, server, recipe_model, package_model):
@@ -136,8 +136,6 @@ class HobHandler(gobject.GObject): self.server.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"]) elif next_command == self.PARSE_CONFIG: self.server.runCommand(["parseConfigurationFiles", "", ""]) - elif next_command == self.PARSE_BBFILES: - self.server.runCommand(["parseFiles"]) elif next_command == self.GENERATE_TGTS: self.server.runCommand(["generateTargetsTree", "classes/image.bbclass", []]) elif next_command == self.GENERATE_PACKAGEINFO:
@@ -345,7 +343,6 @@ class HobHandler(gobject.GObject): targets.extend(tgts) self.recipe_queue = targets self.commands_async.append(self.PARSE_CONFIG) - self.commands_async.append(self.PARSE_BBFILES) self.commands_async.append(self.BUILD_TARGET_RECIPES) self.run_next_command(self.GENERATE_PACKAGES)
@@ -353,7 +350,6 @@ class HobHandler(gobject.GObject): self.package_queue = tgts self.toolchain_build = toolchain_build self.commands_async.append(self.PARSE_CONFIG) - self.commands_async.append(self.PARSE_BBFILES) self.commands_async.append(self.BUILD_TARGET_IMAGE) self.run_next_command(self.GENERATE_IMAGE)
Signature · 1 line
1.7.4.1
PATCH 2/7 Hob: Cleanup for hobeventhandler.py
In reply to Dongxiao Xu--- lib/bb/ui/crumbs/builder.py | 2 +- lib/bb/ui/crumbs/hobeventhandler.py | 75 ++++++++++++++-------------------- lib/bb/ui/hob.py | 4 +- 3 files changed, 34 insertions(+), 47 deletions(-)
lib/bb/ui/crumbs/builder.py +1 -1
@@ -409,7 +409,7 @@ class Builder(gtk.Window): self.parameters.all_layers = layers def handler_command_succeeded_cb(self, handler, initcmd): - if initcmd == self.handler.LAYERS_REFRESH: + if initcmd == self.handler.GENERATE_CONFIGURATION: self.image_configuration_page.switch_machine_combo() elif initcmd in [self.handler.GENERATE_RECIPES, self.handler.GENERATE_PACKAGES,
lib/bb/ui/crumbs/hobeventhandler.py +31 -44
131 lines not on this page · raw message
lib/bb/ui/hob.py +2 -2
@@ -56,10 +56,10 @@ def main (server = None, eventHandler = None): package_model = PackageListModel() hobHandler = HobHandler(server, recipe_model, package_model) - if hobHandler.kick() == False: - return 1 builder = Builder(hobHandler, recipe_model, package_model) + hobHandler.generate_configuration() + # This timeout function regularly probes the event queue to find out if we # have any messages waiting for us. gobject.timeout_add(10, event_handle_idle_func, eventHandler, hobHandler)
Signature · 1 line
1.7.4.1
PATCH 3/7 Hob: Initial an empty label in recipeselectionpage.py
In reply to Dongxiao XuWhen creating label in recipeselectionpage.py, the builder's configuration may not be ready yet, so create an empty label in initialization.
--- lib/bb/ui/crumbs/recipeselectionpage.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/bb/ui/crumbs/recipeselectionpage.py +1 -1
@@ -118,7 +118,7 @@ class RecipeSelectionPage (HobPage): self.create_visual_elements() def create_visual_elements(self): - self.label = gtk.Label("Recipes included: %s" % len(self.builder.configuration.selected_recipes)) + self.label = gtk.Label() self.eventbox = self.add_onto_top_bar(self.label, 73) self.pack_start(self.eventbox, expand=False, fill=False) self.pack_start(self.group_align, expand=True, fill=True)
Signature · 1 line
1.7.4.1
PATCH 4/7 Hob: Change the Hob initialization process
In reply to Dongxiao XuThis change allows adding extra inherits before getting all the parameters.
--- lib/bb/ui/crumbs/builder.py | 17 +++++++++++------ lib/bb/ui/crumbs/hobeventhandler.py | 6 +++++- lib/bb/ui/hob.py | 2 -- 3 files changed, 16 insertions(+), 9 deletions(-)
lib/bb/ui/crumbs/builder.py +11 -6
@@ -186,11 +186,6 @@ class Builder(gtk.Window): self.template = None - # settings - params = self.handler.get_parameters() - self.configuration = Configuration(params) - self.parameters = Parameters(params) - # build step self.current_step = None self.previous_step = None
@@ -224,6 +219,10 @@ class Builder(gtk.Window): self.handler.connect("command-succeeded", self.handler_command_succeeded_cb) self.handler.connect("command-failed", self.handler_command_failed_cb) + self.handler.init_cooker() + self.handler.set_extra_inherit("image_types") + self.handler.parse_config() + self.switch_page(self.MACHINE_SELECTION) def create_visual_elements(self):
@@ -409,7 +408,13 @@ class Builder(gtk.Window): self.parameters.all_layers = layers def handler_command_succeeded_cb(self, handler, initcmd): - if initcmd == self.handler.GENERATE_CONFIGURATION: + if initcmd == self.handler.PARSE_CONFIG: + # settings + params = self.handler.get_parameters() + self.configuration = Configuration(params) + self.parameters = Parameters(params) + self.handler.generate_configuration() + elif initcmd == self.handler.GENERATE_CONFIGURATION: self.image_configuration_page.switch_machine_combo() elif initcmd in [self.handler.GENERATE_RECIPES, self.handler.GENERATE_PACKAGES,
lib/bb/ui/crumbs/hobeventhandler.py +5 -1
@@ -62,7 +62,7 @@ class HobHandler(gobject.GObject): (gobject.TYPE_PYOBJECT,)), } - (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5) + (PARSE_CONFIG, GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(6) (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) def __init__(self, server, recipe_model, package_model):
@@ -246,6 +246,10 @@ class HobHandler(gobject.GObject): def init_cooker(self): self.server.runCommand(["initCooker"]) + def parse_config(self): + self.commands_async.append(self.SUB_PARSE_CONFIG) + self.run_next_command(self.PARSE_CONFIG) + def refresh_layers(self, bblayers): self.init_cooker() self.set_bblayers(bblayers)
lib/bb/ui/hob.py +0 -2
@@ -58,8 +58,6 @@ def main (server = None, eventHandler = None): hobHandler = HobHandler(server, recipe_model, package_model) builder = Builder(hobHandler, recipe_model, package_model) - hobHandler.generate_configuration() - # This timeout function regularly probes the event queue to find out if we # have any messages waiting for us. gobject.timeout_add(10, event_handle_idle_func, eventHandler, hobHandler)
Signature · 1 line
1.7.4.1
PATCH 5/7 Hob: Fix the workaround to get image types
In reply to Dongxiao Xu--- lib/bb/ui/crumbs/hobeventhandler.py | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
lib/bb/ui/crumbs/hobeventhandler.py +1 -2
@@ -430,8 +430,7 @@ class HobHandler(gobject.GObject): params["image_fstypes"] = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "" - # walkaround - params["image_types"] = " ".join(hcc.SUPPORTED_IMAGE_TYPES.keys()).lstrip(" ") + params["image_types"] = self.server.runCommand(["getVariable", "IMAGE_TYPES"]) or "" params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or "" params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or ""
Signature · 1 line
1.7.4.1
PATCH 6/7 Hob: Add a supported image type "vmdk"
In reply to Dongxiao Xu--- lib/bb/ui/crumbs/hobwidget.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
lib/bb/ui/crumbs/hobwidget.py +1 -0
@@ -82,6 +82,7 @@ class hcc: "cpio" : ["cpio"], "cpio.gz" : ["cpio.gz"], "cpio.xz" : ["cpio.xz"], + "vmdk" : ["vmdk"], "cpio.lzma" : ["cpio.lzma"], }
Signature · 1 line
1.7.4.1
PATCH 7/7 Hob: runqemu and deployment functionality filter
In reply to Dongxiao XuImplement the filter for runqemu and deployment functionality.
runqemu
1) suffix should be in the list of RUNNABLE_IMAGE_TYPES.
2) machine should match the pattern of RUNNABLE_MACHINE_PATTERNS.
deployment:
1) suffix should be in the list of DEPLOYMENT_IMAGE_TYPES.
--- lib/bb/ui/crumbs/builder.py | 3 ++ lib/bb/ui/crumbs/hobeventhandler.py | 4 +++ lib/bb/ui/crumbs/imagedetailspage.py | 44 +++++++++++++++++++++++++-------- 3 files changed, 40 insertions(+), 11 deletions(-)
lib/bb/ui/crumbs/builder.py +3 -0
@@ -135,6 +135,9 @@ class Parameters: self.image_names = [] self.image_addr = params["image_addr"] self.image_types = params["image_types"].split() + self.runnable_image_types = params["runnable_image_types"].split() + self.runnable_machine_patterns = params["runnable_machine_patterns"].split() + self.deployable_image_types = params["deployable_image_types"].split() class Builder(gtk.Window):
lib/bb/ui/crumbs/hobeventhandler.py +4 -0
@@ -434,4 +434,8 @@ class HobHandler(gobject.GObject): params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or "" params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or "" + + params["runnable_image_types"] = self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "" + params["runnable_machine_patterns"] = self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "" + params["deployable_image_types"] = self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "" return params
lib/bb/ui/crumbs/imagedetailspage.py +33 -11
68 lines not on this page · raw message
Signature · 1 line
1.7.4.1