bitbake/ui/knotty: fix incorrect exit code
The recent Ctrl+C patch was not fully tested; the variable it was relying upon is set to non-zero under other circumstances and thus bitbake was reporting that it was interrupted and returning a non-zero exit code when it was not. Track this status in a separate variable in order to fix the issue. (Bitbake rev: 95a599067650902727ecb4a39d6dd003c5cfedf3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
8e0c7b3c0d
commit
c8286e049f
|
@ -110,6 +110,7 @@ def main(server, eventHandler):
|
||||||
parseprogress = None
|
parseprogress = None
|
||||||
cacheprogress = None
|
cacheprogress = None
|
||||||
shutdown = 0
|
shutdown = 0
|
||||||
|
interrupted = False
|
||||||
return_value = 0
|
return_value = 0
|
||||||
errors = 0
|
errors = 0
|
||||||
warnings = 0
|
warnings = 0
|
||||||
|
@ -276,6 +277,7 @@ def main(server, eventHandler):
|
||||||
print("\nSecond Keyboard Interrupt, stopping...\n")
|
print("\nSecond Keyboard Interrupt, stopping...\n")
|
||||||
server.runCommand(["stateStop"])
|
server.runCommand(["stateStop"])
|
||||||
if shutdown == 0:
|
if shutdown == 0:
|
||||||
|
interrupted = True
|
||||||
print("\nKeyboard Interrupt, closing down...\n")
|
print("\nKeyboard Interrupt, closing down...\n")
|
||||||
server.runCommand(["stateShutdown"])
|
server.runCommand(["stateShutdown"])
|
||||||
shutdown = shutdown + 1
|
shutdown = shutdown + 1
|
||||||
|
@ -296,7 +298,7 @@ def main(server, eventHandler):
|
||||||
if summary:
|
if summary:
|
||||||
print(summary)
|
print(summary)
|
||||||
|
|
||||||
if shutdown:
|
if interrupted:
|
||||||
print("Execution was interrupted, returning a non-zero exit code.")
|
print("Execution was interrupted, returning a non-zero exit code.")
|
||||||
if return_value == 0:
|
if return_value == 0:
|
||||||
return_value = 1
|
return_value = 1
|
||||||
|
|
Loading…
Reference in New Issue