From: Dongxiao Xu Date: Thu, 29 Mar 2012 12:01:11 +0000 (+0800) Subject: command.py: Move triggerEvent to command async class X-Git-Tag: rev_ivi_2015_02_04~17890 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e5b941728dd54a2de9a477655dfcaea88bd0f26;p=scm%2Fbb%2Ftizen-distro.git command.py: Move triggerEvent to command async class The parameters in triggerEvent function is an event object, and it may cost some time to pass this object through pipe, causing the pipe's poll() function timeout. Change it to async mode. (Bitbake rev: 3b5909ebc86a12dedfb30e5446aa81eb58921760) Signed-off-by: Dongxiao Xu Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 1799f1c..73aaca0 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -179,13 +179,6 @@ class CommandsSync: """ return bb.utils.cpu_count() - def triggerEvent(self, command, params): - """ - Trigger a certain event - """ - event = params[0] - bb.event.fire(eval(event), command.cooker.configuration.data) - class CommandsAsync: """ A class of asynchronous commands @@ -359,3 +352,13 @@ class CommandsAsync: command.cooker.parseConfigurationFiles(prefiles, postfiles) command.finishAsyncCommand() parseConfigurationFiles.needcache = False + + def triggerEvent(self, command, params): + """ + Trigger a certain event + """ + event = params[0] + bb.event.fire(eval(event), command.cooker.configuration.data) + command.currentAsyncCommand = None + triggerEvent.needcache = False +