bitbake: knotty: Cleanup error/interruption handling
Only display a CommandFailed ERROR: message if there is an error to display. Only display an errors summary if we actually displayed errors. (Bitbake rev: 568ea00acd226d48e725bb01d4f8c410ed1eaa61) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
ef7e3882a9
commit
926b60f6e4
|
@ -405,8 +405,9 @@ def main(server, eventHandler, params, tf = TerminalFilter):
|
||||||
|
|
||||||
if isinstance(event, bb.command.CommandFailed):
|
if isinstance(event, bb.command.CommandFailed):
|
||||||
return_value = event.exitcode
|
return_value = event.exitcode
|
||||||
errors = errors + 1
|
if event.error:
|
||||||
logger.error("Command execution failed: %s", event.error)
|
errors = errors + 1
|
||||||
|
logger.error("Command execution failed: %s", event.error)
|
||||||
main.shutdown = 2
|
main.shutdown = 2
|
||||||
continue
|
continue
|
||||||
if isinstance(event, bb.command.CommandExit):
|
if isinstance(event, bb.command.CommandExit):
|
||||||
|
@ -520,7 +521,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
|
||||||
if warnings:
|
if warnings:
|
||||||
summary += pluralise("\nSummary: There was %s WARNING message shown.",
|
summary += pluralise("\nSummary: There was %s WARNING message shown.",
|
||||||
"\nSummary: There were %s WARNING messages shown.", warnings)
|
"\nSummary: There were %s WARNING messages shown.", warnings)
|
||||||
if return_value:
|
if return_value and errors:
|
||||||
summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.",
|
summary += pluralise("\nSummary: There was %s ERROR message shown, returning a non-zero exit code.",
|
||||||
"\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors)
|
"\nSummary: There were %s ERROR messages shown, returning a non-zero exit code.", errors)
|
||||||
if summary:
|
if summary:
|
||||||
|
|
Loading…
Reference in New Issue