[bitbake-devel] [PATCH 4/6] ui/crumbs/hobeventhandler: reparse files before running other commands

Joshua Lock josh at linux.intel.com
Fri Jul 15 20:20:16 UTC 2011


Integrate reparseFiles into the run_next_command() method rather than calling
reparseFiles on the server and immediately calling other methods.

Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
 lib/bb/ui/crumbs/hobeventhandler.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/bb/ui/crumbs/hobeventhandler.py b/lib/bb/ui/crumbs/hobeventhandler.py
index 50f3419..8a17e37 100644
--- a/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/lib/bb/ui/crumbs/hobeventhandler.py
@@ -61,7 +61,7 @@ class HobHandler(gobject.GObject):
                                    gobject.TYPE_STRING)),
     }
 
-    (CFG_PATH_LOCAL, CFG_PATH_HOB, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDK, FILES_MATCH_CLASS, GENERATE_TGTS) = range(8)
+    (CFG_PATH_LOCAL, CFG_PATH_HOB, CFG_PATH_LAYERS, CFG_FILES_DISTRO, CFG_FILES_MACH, CFG_FILES_SDK, FILES_MATCH_CLASS, GENERATE_TGTS, REPARSE_FILES) = range(9)
 
     def __init__(self, taskmodel, server):
         gobject.GObject.__init__(self)
@@ -108,6 +108,9 @@ class HobHandler(gobject.GObject):
                 self.emit("data-generated")
                 self.generating = False
             self.current_command = None
+        elif self.current_command == self.REPARSE_FILES:
+            self.current_command = self.CFG_PATH_LAYERS
+            self.server.runCommand(["reparseFiles"])
         else:
             # No command?
             pass
@@ -196,8 +199,7 @@ class HobHandler(gobject.GObject):
         img = self.model.selected_image
         selected_packages, _ = self.model.get_selected_packages()
         self.emit("reload-triggered", img, " ".join(selected_packages))
-        self.server.runCommand(["reparseFiles"])
-        self.current_command = self.CFG_PATH_LAYERS
+        self.current_command = self.REPARSE_FILES
         self.run_next_command()
 
     def set_bbthreads(self, threads):
-- 
1.7.6





More information about the bitbake-devel mailing list