Patchwork [bitbake-devel,1/4] hob: change error_msg for CommandFailed event

login
register
mail settings
Submitter Irina Patru
Date Jan. 21, 2014, 3:59 p.m.
Message ID <1390319978-31756-1-git-send-email-irina.patru@intel.com>
Download mbox | patch
Permalink /patch/65373/
State New
Headers show

Comments

Irina Patru - Jan. 21, 2014, 3:59 p.m.
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(-)

Patch

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,