diff options
author | Cristiana Voicu <cristiana.voicu@intel.com> | 2013-01-21 16:40:07 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-21 19:05:31 +0000 |
commit | 37e025f6f9c410005e0f1dee0767e38eaec01cbd (patch) | |
tree | 1fd4d838cc1cab373a62bc47bf3226c9924dd512 /bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |
parent | 4c1ebc7ca73f4ee069dc471a395073ba9a8ce00e (diff) | |
download | poky-37e025f6f9c410005e0f1dee0767e38eaec01cbd.tar.gz |
bitbake: hob: Hob should display warnings generated during parsing
-now Hob catches the warnings generated during parsing, and after the parsing
is completed, if there are any warnings, it shows a bar that contains a message
with how many warnings has encountered, and a button "View warnings"
-when "View warnings" button is clicked, Hob shows a dialog with the warnings;
if there more than 1 warning, you can use "Previous" and "Next" button to see them
[YOCTO #3215]
(Bitbake rev: d7b5311d35b3974398fecabfb5ecf1effa85c27e)
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobeventhandler.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index e690d4c99c..41022ef8eb 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py | |||
@@ -41,6 +41,9 @@ class HobHandler(gobject.GObject): | |||
41 | "command-failed" : (gobject.SIGNAL_RUN_LAST, | 41 | "command-failed" : (gobject.SIGNAL_RUN_LAST, |
42 | gobject.TYPE_NONE, | 42 | gobject.TYPE_NONE, |
43 | (gobject.TYPE_STRING,)), | 43 | (gobject.TYPE_STRING,)), |
44 | "parsing-warning" : (gobject.SIGNAL_RUN_LAST, | ||
45 | gobject.TYPE_NONE, | ||
46 | (gobject.TYPE_STRING,)), | ||
44 | "sanity-failed" : (gobject.SIGNAL_RUN_LAST, | 47 | "sanity-failed" : (gobject.SIGNAL_RUN_LAST, |
45 | gobject.TYPE_NONE, | 48 | gobject.TYPE_NONE, |
46 | (gobject.TYPE_STRING, gobject.TYPE_INT)), | 49 | (gobject.TYPE_STRING, gobject.TYPE_INT)), |
@@ -95,6 +98,7 @@ class HobHandler(gobject.GObject): | |||
95 | self.server = server | 98 | self.server = server |
96 | self.error_msg = "" | 99 | self.error_msg = "" |
97 | self.initcmd = None | 100 | self.initcmd = None |
101 | self.parsing = False | ||
98 | 102 | ||
99 | def set_busy(self): | 103 | def set_busy(self): |
100 | if not self.generating: | 104 | if not self.generating: |
@@ -207,6 +211,11 @@ class HobHandler(gobject.GObject): | |||
207 | formatter = bb.msg.BBLogFormatter() | 211 | formatter = bb.msg.BBLogFormatter() |
208 | msg = formatter.format(event) | 212 | msg = formatter.format(event) |
209 | self.error_msg += msg + '\n' | 213 | self.error_msg += msg + '\n' |
214 | elif event.levelno >= logging.WARNING and self.parsing == True: | ||
215 | formatter = bb.msg.BBLogFormatter() | ||
216 | msg = formatter.format(event) | ||
217 | warn_msg = msg + '\n' | ||
218 | self.emit("parsing-warning", warn_msg) | ||
210 | 219 | ||
211 | elif isinstance(event, bb.event.TargetsTreeGenerated): | 220 | elif isinstance(event, bb.event.TargetsTreeGenerated): |
212 | self.current_phase = "data generation" | 221 | self.current_phase = "data generation" |
@@ -249,6 +258,8 @@ class HobHandler(gobject.GObject): | |||
249 | message["total"] = None | 258 | message["total"] = None |
250 | message["title"] = "Parsing recipes" | 259 | message["title"] = "Parsing recipes" |
251 | self.emit("parsing-started", message) | 260 | self.emit("parsing-started", message) |
261 | if isinstance(event, bb.event.ParseStarted): | ||
262 | self.parsing = True | ||
252 | elif isinstance(event, (bb.event.ParseProgress, | 263 | elif isinstance(event, (bb.event.ParseProgress, |
253 | bb.event.CacheLoadProgress, | 264 | bb.event.CacheLoadProgress, |
254 | bb.event.TreeDataPreparationProgress)): | 265 | bb.event.TreeDataPreparationProgress)): |
@@ -267,6 +278,8 @@ class HobHandler(gobject.GObject): | |||
267 | message["total"] = event.total | 278 | message["total"] = event.total |
268 | message["title"] = "Parsing recipes" | 279 | message["title"] = "Parsing recipes" |
269 | self.emit("parsing-completed", message) | 280 | self.emit("parsing-completed", message) |
281 | if isinstance(event, bb.event.ParseCompleted): | ||
282 | self.parsing = False | ||
270 | elif isinstance(event, bb.event.NetworkTestFailed): | 283 | elif isinstance(event, bb.event.NetworkTestFailed): |
271 | self.emit("network-failed") | 284 | self.emit("network-failed") |
272 | self.run_next_command() | 285 | self.run_next_command() |