bitbake: hob: populate error_msg when hob receives a CommandFailed event
When Hob receives a bb.command.CommandFailed event, it doesn't show any error, because the error_msg is empty. If so, it is hard to detect the issue, because Hob continues to run till it blocks because of an information gap. [YOCTO #5097] (Bitbake rev: a5abd1826f34e6a7eefa837620b846e9b62ae758) Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
de7e6efb80
commit
fe3e26509d
|
@ -98,6 +98,7 @@ 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
|
||||||
|
|
||||||
|
@ -112,6 +113,7 @@ 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:
|
||||||
|
@ -251,6 +253,10 @@ 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 = "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,
|
||||||
|
|
Loading…
Reference in New Issue