All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] hob: change error_msg for CommandFailed event
@ 2014-01-21 15:59 Irina Patru
  2014-01-21 15:59 ` [PATCH 2/4] bitbake: hob: check if parser has attribute 'shutdown' Irina Patru
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Irina Patru @ 2014-01-21 15:59 UTC (permalink / raw)
  To: bitbake-devel

When a bb.command.CommandFailed event is received by Hob, the error
message is stored inside event.error.
This information tells exactly why bitbake failed, so Hob should display
it instead of the current composed message.

Signed-off-by: Irina Patru <irina.patru@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hobeventhandler.py |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index b12f2d8..a3bd264 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -98,7 +98,6 @@ class HobHandler(gobject.GObject):
 
         self.server = server
         self.error_msg = ""
-        self.lastCommand = ""
         self.initcmd = None
         self.parsing = False
 
@@ -113,7 +112,6 @@ class HobHandler(gobject.GObject):
             self.generating = False
 
     def runCommand(self, commandline):
-        self.lastCommand = commandline[0]
         try:
             result, error = self.server.runCommand(commandline)
             if error:
@@ -252,10 +250,7 @@ class HobHandler(gobject.GObject):
             self.current_phase = None
             self.run_next_command()
         elif isinstance(event, bb.command.CommandFailed):
-            if self.error_msg == "":
-                self.error_msg = "The command \"" + self.lastCommand
-                self.error_msg += "\" was sent to bitbake server but it failed. Please"
-                self.error_msg += " check the code executed by this command in bitbake."
+            self.error_msg += event.error
             self.commands_async = []
             self.display_error()
         elif isinstance(event, (bb.event.ParseStarted,
-- 
1.7.9.5



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

* [PATCH 2/4] bitbake: hob: check if parser has attribute 'shutdown'
  2014-01-21 15:59 [PATCH 1/4] hob: change error_msg for CommandFailed event Irina Patru
@ 2014-01-21 15:59 ` Irina Patru
  2014-01-21 15:59 ` [PATCH 3/4] hob: unsetting busy cursor after hitting Stop button Irina Patru
  2014-01-21 15:59 ` [PATCH 4/4] hob: don't display interruptions as fails Irina Patru
  2 siblings, 0 replies; 5+ messages in thread
From: Irina Patru @ 2014-01-21 15:59 UTC (permalink / raw)
  To: bitbake-devel

It must be checked first if parser has the attribute 'shutdown' when
user hits Stop button and the forceshutdown state is given.

[HOB #5579]

Signed-off-by: Irina Patru <irina.patru@intel.com>
---
 bitbake/lib/bb/cooker.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index db4cb51..3cf019b 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1240,7 +1240,8 @@ class BBCooker:
             return
 
         if self.state in (state.shutdown, state.forceshutdown):
-            self.parser.shutdown(clean=False, force = True)
+            if hasattr(self.parser, 'shutdown'):
+                self.parser.shutdown(clean=False, force = True)
             raise bb.BBHandledException()
 
         if self.state != state.parsing:
-- 
1.7.9.5



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

* [PATCH 3/4] hob: unsetting busy cursor after hitting Stop button
  2014-01-21 15:59 [PATCH 1/4] hob: change error_msg for CommandFailed event Irina Patru
  2014-01-21 15:59 ` [PATCH 2/4] bitbake: hob: check if parser has attribute 'shutdown' Irina Patru
@ 2014-01-21 15:59 ` Irina Patru
  2014-01-24 15:55   ` Valentin Popa
  2014-01-21 15:59 ` [PATCH 4/4] hob: don't display interruptions as fails Irina Patru
  2 siblings, 1 reply; 5+ messages in thread
From: Irina Patru @ 2014-01-21 15:59 UTC (permalink / raw)
  To: bitbake-devel

The busy cursor would never change after pressing Stop button.
It should be set after the possible return inside machine_combo_changed_cb()
method.

Signed-off-by: Irina Patru <irina.patru@intel.com>
---
 bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index 79709d0..6372592 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -304,14 +304,15 @@ class ImageConfigurationPage (HobPage):
         self.builder.window.set_cursor(None)
 
     def machine_combo_changed_cb(self, machine_combo):
-        self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
-        self.builder.wait(0.1) #wait for combo and cursor to update
         self.stopping = False
         self.builder.parsing_warnings = []
         combo_item = machine_combo.get_active_text()
         if not combo_item or combo_item == self.__dummy_machine__:
             return
 
+        self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
+        self.builder.wait(0.1) #wait for combo and cursor to update
+
         # remove __dummy_machine__ item from the store list after first user selection
         # because it is no longer valid
         combo_store = machine_combo.get_model()
-- 
1.7.9.5



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

* [PATCH 4/4] hob: don't display interruptions as fails
  2014-01-21 15:59 [PATCH 1/4] hob: change error_msg for CommandFailed event Irina Patru
  2014-01-21 15:59 ` [PATCH 2/4] bitbake: hob: check if parser has attribute 'shutdown' Irina Patru
  2014-01-21 15:59 ` [PATCH 3/4] hob: unsetting busy cursor after hitting Stop button Irina Patru
@ 2014-01-21 15:59 ` Irina Patru
  2 siblings, 0 replies; 5+ messages in thread
From: Irina Patru @ 2014-01-21 15:59 UTC (permalink / raw)
  To: bitbake-devel

When Hob receives a bb.command.CommandFailed event, it should check if
it's a log kind of information.
"Forced shutdown" and "Stopped build" are messages that show when a build
is not complete, but Hob considered them error.

[HOB #5609]

Signed-off-by: Irina Patru <irina.patru@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hobeventhandler.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index a3bd264..3792328 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -250,7 +250,8 @@ class HobHandler(gobject.GObject):
             self.current_phase = None
             self.run_next_command()
         elif isinstance(event, bb.command.CommandFailed):
-            self.error_msg += event.error
+            if event.error not in ("Forced shutdown", "Stopped build"):
+                self.error_msg += event.error
             self.commands_async = []
             self.display_error()
         elif isinstance(event, (bb.event.ParseStarted,
-- 
1.7.9.5



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

* Re: [PATCH 3/4] hob: unsetting busy cursor after hitting Stop button
  2014-01-21 15:59 ` [PATCH 3/4] hob: unsetting busy cursor after hitting Stop button Irina Patru
@ 2014-01-24 15:55   ` Valentin Popa
  0 siblings, 0 replies; 5+ messages in thread
From: Valentin Popa @ 2014-01-24 15:55 UTC (permalink / raw)
  To: Irina Patru, bitbake-devel

On 01/21/2014 05:59 PM, Irina Patru wrote:
> The busy cursor would never change after pressing Stop button.
> It should be set after the possible return inside machine_combo_changed_cb()
> method.
>
> Signed-off-by: Irina Patru <irina.patru@intel.com>
> ---
>   bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> index 79709d0..6372592 100644
> --- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> +++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
> @@ -304,14 +304,15 @@ class ImageConfigurationPage (HobPage):
>           self.builder.window.set_cursor(None)
>   
>       def machine_combo_changed_cb(self, machine_combo):
> -        self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
> -        self.builder.wait(0.1) #wait for combo and cursor to update
>           self.stopping = False
>           self.builder.parsing_warnings = []
>           combo_item = machine_combo.get_active_text()
>           if not combo_item or combo_item == self.__dummy_machine__:
>               return
>   
> +        self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
> +        self.builder.wait(0.1) #wait for combo and cursor to update
> +
>           # remove __dummy_machine__ item from the store list after first user selection
>           # because it is no longer valid
>           combo_store = machine_combo.get_model()

Looks good to me.


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

end of thread, other threads:[~2014-01-24 15:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 15:59 [PATCH 1/4] hob: change error_msg for CommandFailed event Irina Patru
2014-01-21 15:59 ` [PATCH 2/4] bitbake: hob: check if parser has attribute 'shutdown' Irina Patru
2014-01-21 15:59 ` [PATCH 3/4] hob: unsetting busy cursor after hitting Stop button Irina Patru
2014-01-24 15:55   ` Valentin Popa
2014-01-21 15:59 ` [PATCH 4/4] hob: don't display interruptions as fails Irina Patru

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.