All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting
@ 2012-03-24 11:49 Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 1/9] Hob: Remove unnecessary PARSE_BBFILES command Dongxiao Xu
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

Hi Richard,

This is the third pull request for Hob bug fixes, please help to review and pull.

Changes from v2:
1) Change the logic in set_distro(), that is, if defaultsetup is selected in Hob advanced setting dialog, we should leave DISTRO variable not set in bitbake server.
2) Add a new patch to avoid hardcode TMPDIR when executing runqemu.

Thanks,
Dongxiao

The following changes since commit 0348ef08db9ac425d83126d2e6eb465adc28b110:

  Hob: Change the descriptions for view_recipe_button and view_package_button (2012-03-23 16:09:35 +0000)

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 (9):
  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
  Hob: Set empty DISTRO if "defaultsetup" is selected
  Hob: Avoid getting TMPDIR in hardcode

 lib/bb/ui/crumbs/builder.py             |   23 +++++--
 lib/bb/ui/crumbs/hobeventhandler.py     |   94 ++++++++++++++-----------------
 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, 94 insertions(+), 72 deletions(-)

-- 
1.7.4.1




^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/9] Hob: Remove unnecessary PARSE_BBFILES command
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 2/9] Hob: Cleanup for hobeventhandler.py Dongxiao Xu
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

The ASYNC commands can automatically detect if BB file parsing is needed.
Therefore remove this explicit parsing command.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/hobeventhandler.py |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 07cc039..664f866 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -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)
 
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/9] Hob: Cleanup for hobeventhandler.py
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 1/9] Hob: Remove unnecessary PARSE_BBFILES command Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 3/9] Hob: Initial an empty label in recipeselectionpage.py Dongxiao Xu
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 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(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 2fe67d9..0faef9b 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -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,
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 664f866..8094d2d 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -62,8 +62,8 @@ 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, 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)
+    (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5)
+    (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):
         super(HobHandler, self).__init__()
@@ -84,21 +84,6 @@ class HobHandler(gobject.GObject):
         self.error_msg = ""
         self.initcmd = None
 
-    def kick(self):
-        import xmlrpclib
-        try:
-            # kick the while thing off
-            self.commands_async.append(self.CFG_PATH_LAYERS)
-            self.commands_async.append(self.CFG_FILES_DISTRO)
-            self.commands_async.append(self.CFG_FILES_MACH)
-            self.commands_async.append(self.CFG_FILES_SDKMACH)
-            self.commands_async.append(self.FILES_MATCH_CLASS)
-            self.run_next_command()
-            return True
-        except xmlrpclib.Fault as x:
-            print("XMLRPC Fault getting commandline:\n %s" % x)
-            return False
- 
     def set_busy(self):
         if not self.generating:
             self.emit("generating-data")
@@ -122,30 +107,28 @@ class HobHandler(gobject.GObject):
                 self.emit("command-succeeded", self.initcmd)
             return
 
-        if next_command == self.CFG_AVAIL_LAYERS:
-            self.server.runCommand(["findCoreBaseFiles", "layers", "conf/layer.conf"])
-        elif next_command == self.CFG_PATH_LAYERS:
+        if next_command == self.SUB_PATH_LAYERS:
             self.server.runCommand(["findConfigFilePath", "bblayers.conf"])
-        elif next_command == self.CFG_FILES_DISTRO:
+        elif next_command == self.SUB_FILES_DISTRO:
             self.server.runCommand(["findConfigFiles", "DISTRO"])
-        elif next_command == self.CFG_FILES_MACH:
+        elif next_command == self.SUB_FILES_MACH:
             self.server.runCommand(["findConfigFiles", "MACHINE"])
-        elif next_command == self.CFG_FILES_SDKMACH:
+        elif next_command == self.SUB_FILES_SDKMACH:
             self.server.runCommand(["findConfigFiles", "MACHINE-SDK"])
-        elif next_command == self.FILES_MATCH_CLASS:
+        elif next_command == self.SUB_MATCH_CLASS:
             self.server.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
-        elif next_command == self.PARSE_CONFIG:
+        elif next_command == self.SUB_PARSE_CONFIG:
             self.server.runCommand(["parseConfigurationFiles", "", ""])
-        elif next_command == self.GENERATE_TGTS:
+        elif next_command == self.SUB_GNERATE_TGTS:
             self.server.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
-        elif next_command == self.GENERATE_PACKAGEINFO:
+        elif next_command == self.SUB_GENERATE_PKGINFO:
             self.server.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
-        elif next_command == self.BUILD_TARGET_RECIPES:
+        elif next_command == self.SUB_BUILD_RECIPES:
             self.clear_busy()
             self.building = True
             self.server.runCommand(["buildTargets", self.recipe_queue, "build"])
             self.recipe_queue = []
-        elif next_command == self.BUILD_TARGET_IMAGE:
+        elif next_command == self.SUB_BUILD_IMAGE:
             self.clear_busy()
             self.building = True
             targets = ["hob-image"]
@@ -264,14 +247,10 @@ class HobHandler(gobject.GObject):
         self.server.runCommand(["initCooker"])
 
     def refresh_layers(self, bblayers):
-        self.server.runCommand(["initCooker"])
-        self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)])
-        self.commands_async.append(self.PARSE_CONFIG)
-        self.commands_async.append(self.CFG_FILES_DISTRO)
-        self.commands_async.append(self.CFG_FILES_MACH)
-        self.commands_async.append(self.CFG_FILES_SDKMACH)
-        self.commands_async.append(self.FILES_MATCH_CLASS)
-        self.run_next_command(self.LAYERS_REFRESH)
+        self.init_cooker()
+        self.set_bblayers(bblayers)
+        self.commands_async.append(self.SUB_PARSE_CONFIG)
+        self.generate_configuration()
 
     def set_extra_inherit(self, bbclass):
         inherits = self.server.runCommand(["getVariable", "INHERIT"]) or ""
@@ -330,27 +309,35 @@ class HobHandler(gobject.GObject):
             self.server.runCommand(["setVariable", key, value])
 
     def request_package_info_async(self):
-        self.commands_async.append(self.GENERATE_PACKAGEINFO)
+        self.commands_async.append(self.SUB_GENERATE_PKGINFO)
         self.run_next_command(self.POPULATE_PACKAGEINFO)
 
+    def generate_configuration(self):
+        self.commands_async.append(self.SUB_PATH_LAYERS)
+        self.commands_async.append(self.SUB_FILES_DISTRO)
+        self.commands_async.append(self.SUB_FILES_MACH)
+        self.commands_async.append(self.SUB_FILES_SDKMACH)
+        self.commands_async.append(self.SUB_MATCH_CLASS)
+        self.run_next_command(self.GENERATE_CONFIGURATION)
+
     def generate_recipes(self):
-        self.commands_async.append(self.PARSE_CONFIG)
-        self.commands_async.append(self.GENERATE_TGTS)
+        self.commands_async.append(self.SUB_PARSE_CONFIG)
+        self.commands_async.append(self.SUB_GNERATE_TGTS)
         self.run_next_command(self.GENERATE_RECIPES)
                  
     def generate_packages(self, tgts):
         targets = []
         targets.extend(tgts)
         self.recipe_queue = targets
-        self.commands_async.append(self.PARSE_CONFIG)
-        self.commands_async.append(self.BUILD_TARGET_RECIPES)
+        self.commands_async.append(self.SUB_PARSE_CONFIG)
+        self.commands_async.append(self.SUB_BUILD_RECIPES)
         self.run_next_command(self.GENERATE_PACKAGES)
 
     def generate_image(self, tgts, toolchain_build=False):
         self.package_queue = tgts
         self.toolchain_build = toolchain_build
-        self.commands_async.append(self.PARSE_CONFIG)
-        self.commands_async.append(self.BUILD_TARGET_IMAGE)
+        self.commands_async.append(self.SUB_PARSE_CONFIG)
+        self.commands_async.append(self.SUB_BUILD_IMAGE)
         self.run_next_command(self.GENERATE_IMAGE)
 
     def build_failed_async(self):
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index daa708b..7c147c4 100755
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -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)
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/9] Hob: Initial an empty label in recipeselectionpage.py
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 1/9] Hob: Remove unnecessary PARSE_BBFILES command Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 2/9] Hob: Cleanup for hobeventhandler.py Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 4/9] Hob: Change the Hob initialization process Dongxiao Xu
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

When creating label in recipeselectionpage.py, the builder's
configuration may not be ready yet, so create an empty label in
initialization.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/recipeselectionpage.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/recipeselectionpage.py b/lib/bb/ui/crumbs/recipeselectionpage.py
index 881b2ec..ebdb7c1 100755
--- a/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -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)
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/9] Hob: Change the Hob initialization process
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
                   ` (2 preceding siblings ...)
  2012-03-24 11:49 ` [PATCH 3/9] Hob: Initial an empty label in recipeselectionpage.py Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 5/9] Hob: Fix the workaround to get image types Dongxiao Xu
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

This change allows adding extra inherits before getting all the
parameters.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 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(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 0faef9b..d348497 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -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,
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 8094d2d..308ef4d 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -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)
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index 7c147c4..e72ab23 100755
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -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)
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/9] Hob: Fix the workaround to get image types
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
                   ` (3 preceding siblings ...)
  2012-03-24 11:49 ` [PATCH 4/9] Hob: Change the Hob initialization process Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 6/9] Hob: Add a supported image type "vmdk" Dongxiao Xu
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/hobeventhandler.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 308ef4d..ec3e0ef 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -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 ""
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/9] Hob: Add a supported image type "vmdk"
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
                   ` (4 preceding siblings ...)
  2012-03-24 11:49 ` [PATCH 5/9] Hob: Fix the workaround to get image types Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 7/9] Hob: runqemu and deployment functionality filter Dongxiao Xu
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/hobwidget.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobwidget.py b/lib/bb/ui/crumbs/hobwidget.py
index 020c5e2..1213b11 100644
--- a/lib/bb/ui/crumbs/hobwidget.py
+++ b/lib/bb/ui/crumbs/hobwidget.py
@@ -82,6 +82,7 @@ class hcc:
         "cpio"          : ["cpio"],
         "cpio.gz"       : ["cpio.gz"],
         "cpio.xz"       : ["cpio.xz"],
+        "vmdk"          : ["vmdk"],
         "cpio.lzma"     : ["cpio.lzma"],
     }
 
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 7/9] Hob: runqemu and deployment functionality filter
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
                   ` (5 preceding siblings ...)
  2012-03-24 11:49 ` [PATCH 6/9] Hob: Add a supported image type "vmdk" Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 8/9] Hob: Set empty DISTRO if "defaultsetup" is selected Dongxiao Xu
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

Implement 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.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 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(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index d348497..2984490 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -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):
 
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index ec3e0ef..4b8aabc 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -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
diff --git a/lib/bb/ui/crumbs/imagedetailspage.py b/lib/bb/ui/crumbs/imagedetailspage.py
index 07a6eb0..5a5ec3f 100755
--- a/lib/bb/ui/crumbs/imagedetailspage.py
+++ b/lib/bb/ui/crumbs/imagedetailspage.py
@@ -183,7 +183,6 @@ class ImageDetailsPage (HobPage):
             self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, False)
         image_table = HobViewTable(self.__columns__)
         image_table.set_model(self.image_store)
-        image_table.toggle_default()
         image_size = self._size_to_string(os.stat(os.path.join(image_addr, image_names[0])).st_size)
         image_table.connect("toggled", self.toggled_cb)
         view_files_button = gtk.LinkButton("file://%s" % image_addr, "View files")
@@ -256,6 +255,29 @@ class ImageDetailsPage (HobPage):
         model[path][columnid] = True
         self.refresh_package_detail_box(model[path][1])
 
+        type_runnable = False
+        mach_runnable = False
+        image_name = model[path][0]
+        for t in self.builder.parameters.runnable_image_types:
+            if image_name.endswith(t):
+                type_runnable = True
+                break
+
+        for t in self.builder.parameters.runnable_machine_patterns:
+            if t in image_name:
+                mach_runnable = True
+                break
+
+        self.run_button.set_sensitive(type_runnable and mach_runnable)
+
+        deployable = False
+        for t in self.builder.parameters.deployable_image_types:
+            if image_name.endswith(t):
+                deployable = True
+                break
+
+        self.deploy_button.set_sensitive(deployable)
+
     def create_bottom_buttons(self, buttonlist):
         # Create the buttons at the bottom
         bottom_buttons = gtk.HBox(False, 6)
@@ -264,13 +286,13 @@ class ImageDetailsPage (HobPage):
         # create button "Deploy image"
         name = "Deploy image"
         if name in buttonlist:
-            deploy_button = HobButton('Deploy image')
-            deploy_button.set_size_request(205, 49)
-            deploy_button.set_tooltip_text("Deploy image to get your target board")
-            deploy_button.set_flags(gtk.CAN_DEFAULT)
-            deploy_button.grab_default()
-            deploy_button.connect("clicked", self.deploy_button_clicked_cb)
-            bottom_buttons.pack_end(deploy_button, expand=False, fill=False)
+            self.deploy_button = HobButton('Deploy image')
+            self.deploy_button.set_size_request(205, 49)
+            self.deploy_button.set_tooltip_text("Deploy image to get your target board")
+            self.deploy_button.set_flags(gtk.CAN_DEFAULT)
+            self.deploy_button.grab_default()
+            self.deploy_button.connect("clicked", self.deploy_button_clicked_cb)
+            bottom_buttons.pack_end(self.deploy_button, expand=False, fill=False)
             created = True
 
         name = "Run image"
@@ -281,9 +303,9 @@ class ImageDetailsPage (HobPage):
                 bottom_buttons.pack_end(label, expand=False, fill=False)
 
             # create button "Run image"
-            run_button = HobAltButton("Run image")
-            run_button.connect("clicked", self.run_button_clicked_cb)
-            bottom_buttons.pack_end(run_button, expand=False, fill=False)
+            self.run_button = HobAltButton("Run image")
+            self.run_button.connect("clicked", self.run_button_clicked_cb)
+            bottom_buttons.pack_end(self.run_button, expand=False, fill=False)
             created = True
 
         name = "Save as template"
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 8/9] Hob: Set empty DISTRO if "defaultsetup" is selected
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
                   ` (6 preceding siblings ...)
  2012-03-24 11:49 ` [PATCH 7/9] Hob: runqemu and deployment functionality filter Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-24 11:49 ` [PATCH 9/9] Hob: Avoid getting TMPDIR in hardcode Dongxiao Xu
  2012-03-25 11:07 ` [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Richard Purdie
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

In Hob advanced setting, if "defaultsetup" is selected, we need to
leave DISTRO variable not set in bitbake server.

Otherwise, defaultsetup.conf will be parsed twice, causing TMPDIR and
its related variables mess up.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/hobeventhandler.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 4b8aabc..e342811 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -274,7 +274,8 @@ class HobHandler(gobject.GObject):
         self.server.runCommand(["setVariable", "IMAGE_FSTYPES", " ".join(image_fstypes).lstrip(" ")])
 
     def set_distro(self, distro):
-        self.server.runCommand(["setVariable", "DISTRO", distro])
+        if distro != "defaultsetup":
+            self.server.runCommand(["setVariable", "DISTRO", distro])
 
     def set_package_format(self, format):
         package_classes = ""
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 9/9] Hob: Avoid getting TMPDIR in hardcode
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
                   ` (7 preceding siblings ...)
  2012-03-24 11:49 ` [PATCH 8/9] Hob: Set empty DISTRO if "defaultsetup" is selected Dongxiao Xu
@ 2012-03-24 11:49 ` Dongxiao Xu
  2012-03-25 11:07 ` [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Richard Purdie
  9 siblings, 0 replies; 14+ messages in thread
From: Dongxiao Xu @ 2012-03-24 11:49 UTC (permalink / raw)
  To: bitbake-devel

We should get TMPDIR from bitbake server instead of hardcode.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 lib/bb/ui/crumbs/builder.py         |    3 ++-
 lib/bb/ui/crumbs/hobeventhandler.py |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/builder.py b/lib/bb/ui/crumbs/builder.py
index 2984490..7b6c116 100755
--- a/lib/bb/ui/crumbs/builder.py
+++ b/lib/bb/ui/crumbs/builder.py
@@ -138,6 +138,7 @@ class Parameters:
         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()
+        self.tmpdir = params["tmpdir"]
 
 class Builder(gtk.Window):
 
@@ -813,7 +814,7 @@ class Builder(gtk.Window):
 
         if response == gtk.RESPONSE_YES:
             source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env")
-            tmp_path = os.path.join(os.getcwd(), "tmp")
+            tmp_path = self.parameters.tmpdir
             if os.path.exists(image_path) and os.path.exists(kernel_path) \
                and os.path.exists(source_env_path) and os.path.exists(tmp_path):
                 cmdline = "/usr/bin/xterm -e "
diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index e342811..8042fbd 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -439,4 +439,5 @@ class HobHandler(gobject.GObject):
         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 ""
+        params["tmpdir"] = self.server.runCommand(["getVariable", "TMPDIR"]) or ""
         return params
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting
  2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
                   ` (8 preceding siblings ...)
  2012-03-24 11:49 ` [PATCH 9/9] Hob: Avoid getting TMPDIR in hardcode Dongxiao Xu
@ 2012-03-25 11:07 ` Richard Purdie
  2012-03-26  2:38   ` Xu, Dongxiao
  9 siblings, 1 reply; 14+ messages in thread
From: Richard Purdie @ 2012-03-25 11:07 UTC (permalink / raw)
  To: Dongxiao Xu; +Cc: bitbake-devel

On Sat, 2012-03-24 at 19:49 +0800, Dongxiao Xu wrote:
> Hi Richard,
> 
> This is the third pull request for Hob bug fixes, please help to review and pull.
> 
> Changes from v2:
> 1) Change the logic in set_distro(), that is, if defaultsetup is selected in Hob advanced setting dialog, we should leave DISTRO variable not set in bitbake server.
> 2) Add a new patch to avoid hardcode TMPDIR when executing runqemu.
> 
> Thanks,
> Dongxiao
> 
> The following changes since commit 0348ef08db9ac425d83126d2e6eb465adc28b110:
> 
>   Hob: Change the descriptions for view_recipe_button and view_package_button (2012-03-23 16:09:35 +0000)
> 
> 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 (9):
>   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
>   Hob: Set empty DISTRO if "defaultsetup" is selected
>   Hob: Avoid getting TMPDIR in hardcode

Merged to master, thanks.

I do have some concerns around the "runqemu and deployment functionality
filter" in that I'd prefer it if we treated the
RUNNABLE_MACHINE_PATTERNS as a proper regexp and matched it against
MACHINE rather than the image name. I'd prefer to see if behave like
COMPATIBLE_MACHINE for example.

This is a detail we can fix in subsequent patches though.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting
  2012-03-25 11:07 ` [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Richard Purdie
@ 2012-03-26  2:38   ` Xu, Dongxiao
  2012-03-26 10:57     ` Richard Purdie
  0 siblings, 1 reply; 14+ messages in thread
From: Xu, Dongxiao @ 2012-03-26  2:38 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

On Sun, 2012-03-25 at 12:07 +0100, Richard Purdie wrote:
> On Sat, 2012-03-24 at 19:49 +0800, Dongxiao Xu wrote:
> > Hi Richard,
> > 
> > This is the third pull request for Hob bug fixes, please help to review and pull.
> > 
> > Changes from v2:
> > 1) Change the logic in set_distro(), that is, if defaultsetup is selected in Hob advanced setting dialog, we should leave DISTRO variable not set in bitbake server.
> > 2) Add a new patch to avoid hardcode TMPDIR when executing runqemu.
> > 
> > Thanks,
> > Dongxiao
> > 
> > The following changes since commit 0348ef08db9ac425d83126d2e6eb465adc28b110:
> > 
> >   Hob: Change the descriptions for view_recipe_button and view_package_button (2012-03-23 16:09:35 +0000)
> > 
> > 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 (9):
> >   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
> >   Hob: Set empty DISTRO if "defaultsetup" is selected
> >   Hob: Avoid getting TMPDIR in hardcode
> 
> Merged to master, thanks.
> 
> I do have some concerns around the "runqemu and deployment functionality
> filter" in that I'd prefer it if we treated the
> RUNNABLE_MACHINE_PATTERNS as a proper regexp and matched it against
> MACHINE rather than the image name. I'd prefer to see if behave like
> COMPATIBLE_MACHINE for example.

We can change the RUNNABLE_MACHINE_PATTERNS to be regexp style, but
maybe we still need to match it with image name, since we will have two
ways to access to the image details page:
1) Through a normal build, where we are able to get the MACHINE
variable.
2) Through clicking "My images" button and load an already built image,
from which we could not get the MACHINE variable but only image name.

BTW, to implement the filter functionality, we still have a pending
patch for OE-Core that is not in master yet, see:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dxu4/hob-bugfix-oecore&id=10968f8c0cf425011983ef7e0fe4c14b7da5ef74

Thanks,
Dongxiao

> 
> This is a detail we can fix in subsequent patches though.
> 
> Cheers,
> 
> Richard
> 





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting
  2012-03-26  2:38   ` Xu, Dongxiao
@ 2012-03-26 10:57     ` Richard Purdie
  2012-03-27  0:45       ` Xu, Dongxiao
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Purdie @ 2012-03-26 10:57 UTC (permalink / raw)
  To: Xu, Dongxiao; +Cc: bitbake-devel

On Mon, 2012-03-26 at 10:38 +0800, Xu, Dongxiao wrote:
> On Sun, 2012-03-25 at 12:07 +0100, Richard Purdie wrote:
> > On Sat, 2012-03-24 at 19:49 +0800, Dongxiao Xu wrote:
> > > Hi Richard,
> > > 
> > > This is the third pull request for Hob bug fixes, please help to review and pull.
> > > 
> > > Changes from v2:
> > > 1) Change the logic in set_distro(), that is, if defaultsetup is selected in Hob advanced setting dialog, we should leave DISTRO variable not set in bitbake server.
> > > 2) Add a new patch to avoid hardcode TMPDIR when executing runqemu.
> > > 
> > > Thanks,
> > > Dongxiao
> > > 
> > > The following changes since commit 0348ef08db9ac425d83126d2e6eb465adc28b110:
> > > 
> > >   Hob: Change the descriptions for view_recipe_button and view_package_button (2012-03-23 16:09:35 +0000)
> > > 
> > > 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 (9):
> > >   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
> > >   Hob: Set empty DISTRO if "defaultsetup" is selected
> > >   Hob: Avoid getting TMPDIR in hardcode
> > 
> > Merged to master, thanks.
> > 
> > I do have some concerns around the "runqemu and deployment functionality
> > filter" in that I'd prefer it if we treated the
> > RUNNABLE_MACHINE_PATTERNS as a proper regexp and matched it against
> > MACHINE rather than the image name. I'd prefer to see if behave like
> > COMPATIBLE_MACHINE for example.
> 
> We can change the RUNNABLE_MACHINE_PATTERNS to be regexp style, but
> maybe we still need to match it with image name, since we will have two
> ways to access to the image details page:
> 1) Through a normal build, where we are able to get the MACHINE
> variable.
> 2) Through clicking "My images" button and load an already built image,
> from which we could not get the MACHINE variable but only image name.

Ok, that is a good point, thanks.

Can we reliably extract the machine name from the image name? I'm
thinking if regexps are involved they could use the start/end markers (^
$) which could get confusing if its matching the whole image name...

> BTW, to implement the filter functionality, we still have a pending
> patch for OE-Core that is not in master yet, see:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dxu4/hob-bugfix-oecore&id=10968f8c0cf425011983ef7e0fe4c14b7da5ef74

That is on my to merge list, thanks.

Richard




^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting
  2012-03-26 10:57     ` Richard Purdie
@ 2012-03-27  0:45       ` Xu, Dongxiao
  0 siblings, 0 replies; 14+ messages in thread
From: Xu, Dongxiao @ 2012-03-27  0:45 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

On Mon, 2012-03-26 at 11:57 +0100, Richard Purdie wrote:
> On Mon, 2012-03-26 at 10:38 +0800, Xu, Dongxiao wrote:
> > On Sun, 2012-03-25 at 12:07 +0100, Richard Purdie wrote:
> > > On Sat, 2012-03-24 at 19:49 +0800, Dongxiao Xu wrote:
> > > > Hi Richard,
> > > > 
> > > > This is the third pull request for Hob bug fixes, please help to review and pull.
> > > > 
> > > > Changes from v2:
> > > > 1) Change the logic in set_distro(), that is, if defaultsetup is selected in Hob advanced setting dialog, we should leave DISTRO variable not set in bitbake server.
> > > > 2) Add a new patch to avoid hardcode TMPDIR when executing runqemu.
> > > > 
> > > > Thanks,
> > > > Dongxiao
> > > > 
> > > > The following changes since commit 0348ef08db9ac425d83126d2e6eb465adc28b110:
> > > > 
> > > >   Hob: Change the descriptions for view_recipe_button and view_package_button (2012-03-23 16:09:35 +0000)
> > > > 
> > > > 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 (9):
> > > >   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
> > > >   Hob: Set empty DISTRO if "defaultsetup" is selected
> > > >   Hob: Avoid getting TMPDIR in hardcode
> > > 
> > > Merged to master, thanks.
> > > 
> > > I do have some concerns around the "runqemu and deployment functionality
> > > filter" in that I'd prefer it if we treated the
> > > RUNNABLE_MACHINE_PATTERNS as a proper regexp and matched it against
> > > MACHINE rather than the image name. I'd prefer to see if behave like
> > > COMPATIBLE_MACHINE for example.
> > 
> > We can change the RUNNABLE_MACHINE_PATTERNS to be regexp style, but
> > maybe we still need to match it with image name, since we will have two
> > ways to access to the image details page:
> > 1) Through a normal build, where we are able to get the MACHINE
> > variable.
> > 2) Through clicking "My images" button and load an already built image,
> > from which we could not get the MACHINE variable but only image name.
> 
> Ok, that is a good point, thanks.
> 
> Can we reliably extract the machine name from the image name? I'm
> thinking if regexps are involved they could use the start/end markers (^
> $) which could get confusing if its matching the whole image name...

That makes sense, and it is also what I am going to change for the
current code.


> 
> > BTW, to implement the filter functionality, we still have a pending
> > patch for OE-Core that is not in master yet, see:
> > 
> > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=dxu4/hob-bugfix-oecore&id=10968f8c0cf425011983ef7e0fe4c14b7da5ef74
> 
> That is on my to merge list, thanks.

Thanks,
Dongxiao
> 
> Richard
> 





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-03-27  0:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-24 11:49 [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Dongxiao Xu
2012-03-24 11:49 ` [PATCH 1/9] Hob: Remove unnecessary PARSE_BBFILES command Dongxiao Xu
2012-03-24 11:49 ` [PATCH 2/9] Hob: Cleanup for hobeventhandler.py Dongxiao Xu
2012-03-24 11:49 ` [PATCH 3/9] Hob: Initial an empty label in recipeselectionpage.py Dongxiao Xu
2012-03-24 11:49 ` [PATCH 4/9] Hob: Change the Hob initialization process Dongxiao Xu
2012-03-24 11:49 ` [PATCH 5/9] Hob: Fix the workaround to get image types Dongxiao Xu
2012-03-24 11:49 ` [PATCH 6/9] Hob: Add a supported image type "vmdk" Dongxiao Xu
2012-03-24 11:49 ` [PATCH 7/9] Hob: runqemu and deployment functionality filter Dongxiao Xu
2012-03-24 11:49 ` [PATCH 8/9] Hob: Set empty DISTRO if "defaultsetup" is selected Dongxiao Xu
2012-03-24 11:49 ` [PATCH 9/9] Hob: Avoid getting TMPDIR in hardcode Dongxiao Xu
2012-03-25 11:07 ` [PATCH 0/9 v3][PULL] Hob: Bug fixes: image_types, runqemu/deploy functionality filter, and DISTRO setting Richard Purdie
2012-03-26  2:38   ` Xu, Dongxiao
2012-03-26 10:57     ` Richard Purdie
2012-03-27  0:45       ` Xu, Dongxiao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.