1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

bitbake: hob: change error_msg for CommandFailed event

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.

(Bitbake rev: 24543ff6b45771712d624541ae35738d7d98f33c)

Signed-off-by: Irina Patru <irina.patru@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Irina Patru
2014-01-21 17:59:35 +02:00
committed by Richard Purdie
parent 3c5b68356d
commit f43c2d8d79
+1 -6
View File
@@ -98,7 +98,6 @@ class HobHandler(gobject.GObject):
self.server = server self.server = server
self.error_msg = "" self.error_msg = ""
self.lastCommand = ""
self.initcmd = None self.initcmd = None
self.parsing = False self.parsing = False
@@ -113,7 +112,6 @@ class HobHandler(gobject.GObject):
self.generating = False self.generating = False
def runCommand(self, commandline): def runCommand(self, commandline):
self.lastCommand = commandline[0]
try: try:
result, error = self.server.runCommand(commandline) result, error = self.server.runCommand(commandline)
if error: if error:
@@ -252,10 +250,7 @@ class HobHandler(gobject.GObject):
self.current_phase = None self.current_phase = None
self.run_next_command() self.run_next_command()
elif isinstance(event, bb.command.CommandFailed): elif isinstance(event, bb.command.CommandFailed):
if self.error_msg == "": self.error_msg += event.error
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.commands_async = [] self.commands_async = []
self.display_error() self.display_error()
elif isinstance(event, (bb.event.ParseStarted, elif isinstance(event, (bb.event.ParseStarted,