Patchwork [bitbake-devel,1/1] Hob: check if warnings are related to package build

login
register
mail settings
Submitter Valentin Popa
Date Dec. 3, 2013, 3:52 p.m.
Message ID <f825566bb6aafe972e58629e75bd9e1107adfb9d.1386085911.git.valentin.popa@intel.com>
Download mbox | patch
Permalink /patch/62739/
State New
Headers show

Comments

Valentin Popa - Dec. 3, 2013, 3:52 p.m.
If warnings come from recipes parsing
and not from package build, 'parent' object
will be None; so don't update the color for it.

[YOCTO #5621]

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
---
 bitbake/lib/bb/ui/crumbs/runningbuild.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index 0a48a6b..16a955d 100644
--- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
+++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
@@ -174,13 +174,13 @@  class RunningBuild (gobject.GObject):
                       color,
                       0))
 
-            # if there are warnings, mark the task with warning
-            # color;
+            # if there are warnings while processing a package
+            #  (parent), mark the task with warning color;
             # in case there are errors, the updates will be
             #  handled on TaskFailed.
-            if color == HobColors.WARNING:
+            if color == HobColors.WARNING and parent:
                 self.model.set(parent, self.model.COL_COLOR, color)
-                if task: #then we have a parent, and update it's color
+                if task: #then we have a parent (package), and update it's color
                     self.model.set(self.tasks_to_iter[(package, None)], self.model.COL_COLOR, color)
 
         elif isinstance(event, bb.build.TaskStarted):