Patchwork [bitbake-devel,09/17] Hob: Fix the workaround to get image types

login
register
mail settings
Submitter Dongxiao Xu
Date March 21, 2012, 12:55 p.m.
Message ID <bfbedb4119d7415cf43fba281e0d88f632443828.1332334068.git.dongxiao.xu@intel.com>
Download mbox | patch
Permalink /patch/23987/
State New
Headers show

Comments

Dongxiao Xu - March 21, 2012, 12:55 p.m.
Inherit image_types.bbclass before getting parameters to fix the
original workaround.

Besides, kick the handler things off after Builder is initialized.

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

Patch

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index e9d10c5..fe7b5d5 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -379,6 +379,11 @@  class HobHandler(gobject.GObject):
         self.build.reset()
 
     def get_parameters(self):
+        # inherit image_types.bbclass
+        self.init_cooker()
+        self.set_extra_inherit("image_types")
+        self.parse_config()
+    
         # retrieve the parameters from bitbake
         params = {}
         params["core_base"] = self.server.runCommand(["getVariable", "COREBASE"]) or ""
@@ -444,8 +449,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 ""
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py
index daa708b..4c3e572 100755
--- a/lib/bb/ui/hob.py
+++ b/lib/bb/ui/hob.py
@@ -56,9 +56,10 @@  def main (server = None, eventHandler = None):
     package_model = PackageListModel()
 
     hobHandler = HobHandler(server, recipe_model, package_model)
+    builder = Builder(hobHandler, recipe_model, package_model)
+
     if hobHandler.kick() == False:
         return 1
-    builder = Builder(hobHandler, recipe_model, package_model)
 
     # This timeout function regularly probes the event queue to find out if we
     # have any messages waiting for us.