Patchwork [bitbake-devel,1/8] command.py: Change parseConfigurationFiles API from async to sync

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

Comments

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

parseConfigurationFiles will not cost much time and move it to the
CommandSync class.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 bitbake/lib/bb/command.py |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

Patch

diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index 1799f1c..febc90f 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -186,6 +186,14 @@  class CommandsSync:
         event = params[0]
         bb.event.fire(eval(event), command.cooker.configuration.data)
 
+    def parseConfigurationFiles(self, command, params):
+        """
+        Parse the configuration files
+        """
+        prefiles = params[0]
+        postfiles = params[1]
+        command.cooker.parseConfigurationFiles(prefiles, postfiles)
+
 class CommandsAsync:
     """
     A class of asynchronous commands
@@ -350,12 +358,3 @@  class CommandsAsync:
             command.finishAsyncCommand()
     compareRevisions.needcache = True
 
-    def parseConfigurationFiles(self, command, params):
-        """
-        Parse the configuration files
-        """
-        prefiles = params[0]
-        postfiles = params[1]
-        command.cooker.parseConfigurationFiles(prefiles, postfiles)
-        command.finishAsyncCommand()
-    parseConfigurationFiles.needcache = False