Patchwork [bitbake-devel,3/8] Hob: Change parseConfigurationFiles API usage

login
register
mail settings
Submitter Shane Wang
Date March 22, 2012, 3:38 p.m.
Message ID <31ef5d93e6a87e42242ebde8b4b35159f68cb3ac.1332430442.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/24147/
State New
Headers show

Comments

Shane Wang - March 22, 2012, 3:38 p.m.
From: Dongxiao Xu <dongxiao.xu@intel.com>

parseConfigurationFiles API is changed to sync mode, therefore make
accordingly changes in Hob part.

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

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index 07cc039..e9d10c5 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/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_BBFILES, 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):
@@ -134,8 +134,6 @@  class HobHandler(gobject.GObject):
             self.server.runCommand(["findConfigFiles", "MACHINE-SDK"])
         elif next_command == self.FILES_MATCH_CLASS:
             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:
@@ -265,10 +263,13 @@  class HobHandler(gobject.GObject):
     def init_cooker(self):
         self.server.runCommand(["initCooker"])
 
+    def parse_config(self):
+        self.server.runCommand(["parseConfigurationFiles", "", ""])
+
     def refresh_layers(self, bblayers):
         self.server.runCommand(["initCooker"])
         self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)])
-        self.commands_async.append(self.PARSE_CONFIG)
+        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)
@@ -336,7 +337,7 @@  class HobHandler(gobject.GObject):
         self.run_next_command(self.POPULATE_PACKAGEINFO)
 
     def generate_recipes(self):
-        self.commands_async.append(self.PARSE_CONFIG)
+        self.parse_config()
         self.commands_async.append(self.GENERATE_TGTS)
         self.run_next_command(self.GENERATE_RECIPES)
                  
@@ -344,7 +345,7 @@  class HobHandler(gobject.GObject):
         targets = []
         targets.extend(tgts)
         self.recipe_queue = targets
-        self.commands_async.append(self.PARSE_CONFIG)
+        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)
@@ -352,7 +353,7 @@  class HobHandler(gobject.GObject):
     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.parse_config()
         self.commands_async.append(self.PARSE_BBFILES)
         self.commands_async.append(self.BUILD_TARGET_IMAGE)
         self.run_next_command(self.GENERATE_IMAGE)