diff options
author | Valentin Popa <valentin.popa@intel.com> | 2013-11-21 13:55:13 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-24 12:25:37 +0000 |
commit | 300b6f7f49857d5e6a86610003a7753a2f1daed6 (patch) | |
tree | 8e76e76eeb67ec05867ccf96822b740eb1829647 /bitbake/lib | |
parent | 381d5920188398bc53b2454843054c8690bca243 (diff) | |
download | poky-300b6f7f49857d5e6a86610003a7753a2f1daed6.tar.gz |
bitbake: HOB: Show warnings in Issues tab
Proper update of warnings view during build.
[YOCTO #3496]
(Bitbake rev: 124428ba8a0b1cc85d4b96053bf71bce14a5774c)
Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/runningbuild.py | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py index abd3300149..0a48a6ba55 100644 --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py | |||
@@ -174,6 +174,15 @@ class RunningBuild (gobject.GObject): | |||
174 | color, | 174 | color, |
175 | 0)) | 175 | 0)) |
176 | 176 | ||
177 | # if there are warnings, mark the task with warning | ||
178 | # color; | ||
179 | # in case there are errors, the updates will be | ||
180 | # handled on TaskFailed. | ||
181 | if color == HobColors.WARNING: | ||
182 | self.model.set(parent, self.model.COL_COLOR, color) | ||
183 | if task: #then we have a parent, and update it's color | ||
184 | self.model.set(self.tasks_to_iter[(package, None)], self.model.COL_COLOR, color) | ||
185 | |||
177 | elif isinstance(event, bb.build.TaskStarted): | 186 | elif isinstance(event, bb.build.TaskStarted): |
178 | (package, task) = (event._package, event._task) | 187 | (package, task) = (event._package, event._task) |
179 | 188 | ||
@@ -201,9 +210,10 @@ class RunningBuild (gobject.GObject): | |||
201 | 210 | ||
202 | # Because this parent package now has an active child mark it as | 211 | # Because this parent package now has an active child mark it as |
203 | # such. | 212 | # such. |
204 | # @todo if parent is already in error, don't mark it green | 213 | self.model.set(parent, self.model.COL_ICON, "gtk-execute") |
205 | self.model.set(parent, self.model.COL_ICON, "gtk-execute", | 214 | parent_color = self.model.get(parent, self.model.COL_COLOR)[0] |
206 | self.model.COL_COLOR, HobColors.RUNNING) | 215 | if parent_color != HobColors.ERROR and parent_color != HobColors.WARNING: |
216 | self.model.set(parent, self.model.COL_COLOR, HobColors.RUNNING) | ||
207 | 217 | ||
208 | # Add an entry in the model for this task | 218 | # Add an entry in the model for this task |
209 | i = self.model.append (parent, (None, | 219 | i = self.model.append (parent, (None, |
@@ -246,20 +256,28 @@ class RunningBuild (gobject.GObject): | |||
246 | self.model.set(i, self.model.COL_ICON, icon, | 256 | self.model.set(i, self.model.COL_ICON, icon, |
247 | self.model.COL_COLOR, color) | 257 | self.model.COL_COLOR, color) |
248 | else: | 258 | else: |
249 | icon = None | 259 | # Mark the parent package and the task as inactive, |
250 | color = HobColors.OK | 260 | # but make sure to preserve error, warnings and active |
261 | # states | ||
262 | parent_color = self.model.get(parent, self.model.COL_COLOR)[0] | ||
263 | task_color = self.model.get(current, self.model.COL_COLOR)[0] | ||
251 | 264 | ||
252 | # Mark the task as inactive | 265 | # Mark the task as inactive |
253 | self.model.set(current, self.model.COL_ICON, icon, | 266 | self.model.set(current, self.model.COL_ICON, None) |
254 | self.model.COL_COLOR, color) | 267 | if task_color != HobColors.ERROR: |
255 | 268 | if task_color == HobColors.WARNING: | |
256 | # Mark the parent package as inactive, but make sure to | 269 | self.model.set(current, self.model.COL_ICON, 'dialog-warning') |
257 | # preserve error and active states | 270 | else: |
258 | i = self.tasks_to_iter[(package, None)] | 271 | self.model.set(current, self.model.COL_COLOR, HobColors.OK) |
259 | if self.model.get(parent, self.model.COL_ICON) != 'dialog-error': | 272 | |
260 | self.model.set(parent, self.model.COL_ICON, icon) | 273 | # Mark the parent as inactive |
261 | if num_active == 0: | 274 | if parent_color != HobColors.ERROR: |
262 | self.model.set(parent, self.model.COL_COLOR, HobColors.OK) | 275 | if parent_color == HobColors.WARNING: |
276 | self.model.set(parent, self.model.COL_ICON, "dialog-warning") | ||
277 | else: | ||
278 | self.model.set(parent, self.model.COL_ICON, None) | ||
279 | if num_active == 0: | ||
280 | self.model.set(parent, self.model.COL_COLOR, HobColors.OK) | ||
263 | 281 | ||
264 | # Clear the iters and the pids since when the task goes away the | 282 | # Clear the iters and the pids since when the task goes away the |
265 | # pid will no longer be used for messages | 283 | # pid will no longer be used for messages |