Patchwork [bitbake-devel] hob: warnings during the build should be displayed in the Issues tab

login
register
mail settings
Submitter Cristiana Voicu
Date Nov. 13, 2012, 2:48 p.m.
Message ID <1352818126-11334-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/38931/
State New
Headers show

Comments

Cristiana Voicu - Nov. 13, 2012, 2:48 p.m.
Any issues encountered during the build (fatal or not) is displayed
in the Issues tab, and the total number of issues is changed.

[YOCTO #3376]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builder.py      |    1 +
 bitbake/lib/bb/ui/crumbs/runningbuild.py |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index ecf5371..25741fe 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -457,6 +457,7 @@  class Builder(gtk.Window):
         self.handler.build.connect("build-aborted",      self.handler_build_aborted_cb)
         self.handler.build.connect("task-started",       self.handler_task_started_cb)
         self.handler.build.connect("log-error",          self.handler_build_failure_cb)
+        self.handler.build.connect("log-warning",        self.handler_build_failure_cb)
         self.handler.build.connect("log",                self.handler_build_log_cb)
         self.handler.build.connect("no-provider",        self.handler_no_provider_cb)
         self.handler.connect("generating-data",          self.handler_generating_data_cb)
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index b4d19b6..f6848fd 100644
--- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
+++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
@@ -46,7 +46,7 @@  class RunningBuildModel (gtk.TreeStore):
         color = model.get(it, self.COL_COLOR)[0]
         if not color:
             return False
-        if color == HobColors.ERROR:
+        if color == HobColors.ERROR or color == HobColors.WARNING:
             return True
         return False
 
@@ -76,7 +76,7 @@  class RunningBuild (gobject.GObject):
           'build-complete'  :  (gobject.SIGNAL_RUN_LAST,
                                 gobject.TYPE_NONE,
                                ()),
-          'build-aborted'     :  (gobject.SIGNAL_RUN_LAST,
+          'build-aborted'   :  (gobject.SIGNAL_RUN_LAST,
                                 gobject.TYPE_NONE,
                                ()),
           'task-started'    :  (gobject.SIGNAL_RUN_LAST,
@@ -85,6 +85,9 @@  class RunningBuild (gobject.GObject):
           'log-error'       :  (gobject.SIGNAL_RUN_LAST,
                                 gobject.TYPE_NONE,
                                ()),
+          'log-warning'     :  (gobject.SIGNAL_RUN_LAST,
+                                gobject.TYPE_NONE,
+                               ()),
           'no-provider'     :  (gobject.SIGNAL_RUN_LAST,
                                 gobject.TYPE_NONE,
                                (gobject.TYPE_PYOBJECT,)),
@@ -148,6 +151,7 @@  class RunningBuild (gobject.GObject):
             elif event.levelno >= logging.WARNING:
                 icon = "dialog-warning"
                 color = HobColors.WARNING
+                self.emit("log-warning")
             else:
                 icon = None
                 color = HobColors.OK