All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] HOB: Show warnings in Issues tab
@ 2013-11-21 11:55 Valentin Popa
  2013-11-21 11:55 ` [PATCH 1/1] " Valentin Popa
  0 siblings, 1 reply; 3+ messages in thread
From: Valentin Popa @ 2013-11-21 11:55 UTC (permalink / raw)
  To: bitbake-devel


The following changes since commit 725fae65810c477882f7f9d02561362b3f603db0:

  bitbake: toasterui: fix typo (2013-11-20 14:06:49 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib vpopa/YOCTO_3496
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=vpopa/YOCTO_3496

Valentin Popa (1):
  HOB: Show warnings in Issues tab

 bitbake/lib/bb/ui/crumbs/runningbuild.py | 48 ++++++++++++++++++++++----------
 1 file changed, 33 insertions(+), 15 deletions(-)

-- 
1.8.3.2



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] HOB: Show warnings in Issues tab
  2013-11-21 11:55 [PATCH 0/1] HOB: Show warnings in Issues tab Valentin Popa
@ 2013-11-21 11:55 ` Valentin Popa
  2013-11-22  9:32   ` Voicu, Cristiana
  0 siblings, 1 reply; 3+ messages in thread
From: Valentin Popa @ 2013-11-21 11:55 UTC (permalink / raw)
  To: bitbake-devel

Proper update of warnings view during build.

[YOCTO #3496]

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

diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index abd3300..0a48a6b 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):
                       color,
                       0))
 
+            # if there are warnings, mark the task with warning
+            # color;
+            # in case there are errors, the updates will be
+            #  handled on TaskFailed.
+            if color == HobColors.WARNING:
+                self.model.set(parent, self.model.COL_COLOR, color)
+                if task: #then we have a parent, 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):
             (package, task) = (event._package, event._task)
 
@@ -201,9 +210,10 @@ class RunningBuild (gobject.GObject):
 
             # Because this parent package now has an active child mark it as
             # such.
-            # @todo if parent is already in error, don't mark it green
-            self.model.set(parent, self.model.COL_ICON, "gtk-execute",
-                           self.model.COL_COLOR, HobColors.RUNNING)
+            self.model.set(parent, self.model.COL_ICON, "gtk-execute")
+            parent_color = self.model.get(parent, self.model.COL_COLOR)[0]
+            if parent_color != HobColors.ERROR and parent_color != HobColors.WARNING:
+                self.model.set(parent, self.model.COL_COLOR, HobColors.RUNNING)
 
             # Add an entry in the model for this task
             i = self.model.append (parent, (None,
@@ -246,20 +256,28 @@ class RunningBuild (gobject.GObject):
                     self.model.set(i, self.model.COL_ICON, icon,
                                    self.model.COL_COLOR, color)
             else:
-                icon = None
-                color = HobColors.OK
+                # Mark the parent package and the task as inactive,
+                # but make sure to preserve error, warnings and active
+                # states
+                parent_color = self.model.get(parent, self.model.COL_COLOR)[0]
+                task_color = self.model.get(current, self.model.COL_COLOR)[0]
 
                 # Mark the task as inactive
-                self.model.set(current, self.model.COL_ICON, icon,
-                               self.model.COL_COLOR, color)
-
-                # Mark the parent package as inactive, but make sure to
-                # preserve error and active states
-                i = self.tasks_to_iter[(package, None)]
-                if self.model.get(parent, self.model.COL_ICON) != 'dialog-error':
-                    self.model.set(parent, self.model.COL_ICON, icon)
-                    if num_active == 0:
-                        self.model.set(parent, self.model.COL_COLOR, HobColors.OK)
+                self.model.set(current, self.model.COL_ICON, None)
+                if task_color != HobColors.ERROR:
+                    if task_color == HobColors.WARNING:
+                        self.model.set(current, self.model.COL_ICON, 'dialog-warning')
+                    else:
+                        self.model.set(current, self.model.COL_COLOR, HobColors.OK)
+
+                # Mark the parent as inactive
+                if parent_color != HobColors.ERROR:
+                    if parent_color == HobColors.WARNING:
+                        self.model.set(parent, self.model.COL_ICON, "dialog-warning")
+                    else:
+                        self.model.set(parent, self.model.COL_ICON, None)
+                        if num_active == 0:
+                            self.model.set(parent, self.model.COL_COLOR, HobColors.OK)
 
             # Clear the iters and the pids since when the task goes away the
             # pid will no longer be used for messages
-- 
1.8.3.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] HOB: Show warnings in Issues tab
  2013-11-21 11:55 ` [PATCH 1/1] " Valentin Popa
@ 2013-11-22  9:32   ` Voicu, Cristiana
  0 siblings, 0 replies; 3+ messages in thread
From: Voicu, Cristiana @ 2013-11-22  9:32 UTC (permalink / raw)
  To: Popa, Valentin, bitbake-devel@lists.openembedded.org

Looks good to me.
Cristiana

-----Original Message-----
From: bitbake-devel-bounces@lists.openembedded.org [mailto:bitbake-devel-bounces@lists.openembedded.org] On Behalf Of Valentin Popa
Sent: Thursday, November 21, 2013 1:55 PM
To: bitbake-devel@lists.openembedded.org
Subject: [bitbake-devel] [PATCH 1/1] HOB: Show warnings in Issues tab

Proper update of warnings view during build.

[YOCTO #3496]

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

diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index abd3300..0a48a6b 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):
                       color,
                       0))
 
+            # if there are warnings, mark the task with warning
+            # color;
+            # in case there are errors, the updates will be
+            #  handled on TaskFailed.
+            if color == HobColors.WARNING:
+                self.model.set(parent, self.model.COL_COLOR, color)
+                if task: #then we have a parent, 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):
             (package, task) = (event._package, event._task)
 
@@ -201,9 +210,10 @@ class RunningBuild (gobject.GObject):
 
             # Because this parent package now has an active child mark it as
             # such.
-            # @todo if parent is already in error, don't mark it green
-            self.model.set(parent, self.model.COL_ICON, "gtk-execute",
-                           self.model.COL_COLOR, HobColors.RUNNING)
+            self.model.set(parent, self.model.COL_ICON, "gtk-execute")
+            parent_color = self.model.get(parent, self.model.COL_COLOR)[0]
+            if parent_color != HobColors.ERROR and parent_color != HobColors.WARNING:
+                self.model.set(parent, self.model.COL_COLOR, 
+ HobColors.RUNNING)
 
             # Add an entry in the model for this task
             i = self.model.append (parent, (None, @@ -246,20 +256,28 @@ class RunningBuild (gobject.GObject):
                     self.model.set(i, self.model.COL_ICON, icon,
                                    self.model.COL_COLOR, color)
             else:
-                icon = None
-                color = HobColors.OK
+                # Mark the parent package and the task as inactive,
+                # but make sure to preserve error, warnings and active
+                # states
+                parent_color = self.model.get(parent, self.model.COL_COLOR)[0]
+                task_color = self.model.get(current, 
+ self.model.COL_COLOR)[0]
 
                 # Mark the task as inactive
-                self.model.set(current, self.model.COL_ICON, icon,
-                               self.model.COL_COLOR, color)
-
-                # Mark the parent package as inactive, but make sure to
-                # preserve error and active states
-                i = self.tasks_to_iter[(package, None)]
-                if self.model.get(parent, self.model.COL_ICON) != 'dialog-error':
-                    self.model.set(parent, self.model.COL_ICON, icon)
-                    if num_active == 0:
-                        self.model.set(parent, self.model.COL_COLOR, HobColors.OK)
+                self.model.set(current, self.model.COL_ICON, None)
+                if task_color != HobColors.ERROR:
+                    if task_color == HobColors.WARNING:
+                        self.model.set(current, self.model.COL_ICON, 'dialog-warning')
+                    else:
+                        self.model.set(current, self.model.COL_COLOR, 
+ HobColors.OK)
+
+                # Mark the parent as inactive
+                if parent_color != HobColors.ERROR:
+                    if parent_color == HobColors.WARNING:
+                        self.model.set(parent, self.model.COL_ICON, "dialog-warning")
+                    else:
+                        self.model.set(parent, self.model.COL_ICON, None)
+                        if num_active == 0:
+                            self.model.set(parent, 
+ self.model.COL_COLOR, HobColors.OK)
 
             # Clear the iters and the pids since when the task goes away the
             # pid will no longer be used for messages
--
1.8.3.2

_______________________________________________
bitbake-devel mailing list
bitbake-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/bitbake-devel


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-22  9:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 11:55 [PATCH 0/1] HOB: Show warnings in Issues tab Valentin Popa
2013-11-21 11:55 ` [PATCH 1/1] " Valentin Popa
2013-11-22  9:32   ` Voicu, Cristiana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.