summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-23 16:16:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-26 11:29:46 +0100
commit69aab78dd830b0ad570cf9b7bfe2da8e8b793e23 (patch)
tree8c799233df8ef5f3e9129da4c54241acea2c65f9 /bitbake/lib/bb/ui
parentbfab986ccd59636d0b0e79309f020e55481b0567 (diff)
downloadpoky-69aab78dd830b0ad570cf9b7bfe2da8e8b793e23.tar.gz
bitbake: bitbake: Add ui event handlers filtering
Add functionality to allow UIs to update and change the types of events they recieve. To do this we need to add a new command and also need to be able to obtain the current event hander ID. In the case of xmlrpc, this is straightforward, in the case of the process server we need to save the result in a multiprocessing.Value() so we can retrive it. An excplit command was added to the server API to facilitate this. The same function can also be used to mask or unmask specific log messages, allowing the UI to optionally differ from the standard set of message filtering. Based upon work by Cristiana Voicu <cristiana.voicu@intel.com> (Bitbake rev: ba5a6c88785d9889d4172ec79937ac2a5555327e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/knotty.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index 09ad99ebe8..1692e3295c 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -232,6 +232,15 @@ def _log_settings_from_server(server):
232 raise BaseException(error) 232 raise BaseException(error)
233 return includelogs, loglines, consolelogfile 233 return includelogs, loglines, consolelogfile
234 234
235_evt_list = [ "bb.runqueue.runQueueExitWait", "bb.event.LogExecTTY", "logging.LogRecord",
236 "bb.build.TaskFailed", "bb.build.TaskBase", "bb.event.ParseStarted",
237 "bb.event.ParseProgress", "bb.event.ParseCompleted", "bb.event.CacheLoadStarted",
238 "bb.event.CacheLoadProgress", "bb.event.CacheLoadCompleted", "bb.command.CommandFailed",
239 "bb.command.CommandExit", "bb.command.CommandCompleted", "bb.cooker.CookerExit",
240 "bb.event.MultipleProviders", "bb.event.NoProvider", "bb.runqueue.sceneQueueTaskStarted",
241 "bb.runqueue.runQueueTaskStarted", "bb.runqueue.runQueueTaskFailed", "bb.runqueue.sceneQueueTaskFailed",
242 "bb.event.BuildBase", "bb.build.TaskStarted", "bb.build.TaskSucceeded", "bb.build.TaskFailedSilent"]
243
235def main(server, eventHandler, params, tf = TerminalFilter): 244def main(server, eventHandler, params, tf = TerminalFilter):
236 245
237 includelogs, loglines, consolelogfile = _log_settings_from_server(server) 246 includelogs, loglines, consolelogfile = _log_settings_from_server(server)
@@ -262,6 +271,9 @@ def main(server, eventHandler, params, tf = TerminalFilter):
262 consolelog.setFormatter(conlogformat) 271 consolelog.setFormatter(conlogformat)
263 logger.addHandler(consolelog) 272 logger.addHandler(consolelog)
264 273
274 llevel, debug_domains = bb.msg.constructLogOptions()
275 server.runCommand(["setEventMask", server.getEventHandle(), llevel, debug_domains, _evt_list])
276
265 if not params.observe_only: 277 if not params.observe_only:
266 params.updateFromServer(server) 278 params.updateFromServer(server)
267 cmdline = params.parseActions() 279 cmdline = params.parseActions()