diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2012-02-22 21:24:41 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-02-22 21:30:29 +0000 |
commit | c8286e049f911605f61733dc8fce3a7e331d7e9c (patch) | |
tree | cfa622c6ce5554e77077f02b506a9077cd159ff0 /bitbake | |
parent | 8e0c7b3c0de1726617eeef61294b21adde177649 (diff) | |
download | poky-c8286e049f911605f61733dc8fce3a7e331d7e9c.tar.gz |
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>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/ui/knotty.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 9881d828d1..158a132726 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py | |||
@@ -110,6 +110,7 @@ def main(server, eventHandler): | |||
110 | parseprogress = None | 110 | parseprogress = None |
111 | cacheprogress = None | 111 | cacheprogress = None |
112 | shutdown = 0 | 112 | shutdown = 0 |
113 | interrupted = False | ||
113 | return_value = 0 | 114 | return_value = 0 |
114 | errors = 0 | 115 | errors = 0 |
115 | warnings = 0 | 116 | warnings = 0 |
@@ -276,6 +277,7 @@ def main(server, eventHandler): | |||
276 | print("\nSecond Keyboard Interrupt, stopping...\n") | 277 | print("\nSecond Keyboard Interrupt, stopping...\n") |
277 | server.runCommand(["stateStop"]) | 278 | server.runCommand(["stateStop"]) |
278 | if shutdown == 0: | 279 | if shutdown == 0: |
280 | interrupted = True | ||
279 | print("\nKeyboard Interrupt, closing down...\n") | 281 | print("\nKeyboard Interrupt, closing down...\n") |
280 | server.runCommand(["stateShutdown"]) | 282 | server.runCommand(["stateShutdown"]) |
281 | shutdown = shutdown + 1 | 283 | shutdown = shutdown + 1 |
@@ -296,7 +298,7 @@ def main(server, eventHandler): | |||
296 | if summary: | 298 | if summary: |
297 | print(summary) | 299 | print(summary) |
298 | 300 | ||
299 | if shutdown: | 301 | if interrupted: |
300 | print("Execution was interrupted, returning a non-zero exit code.") | 302 | print("Execution was interrupted, returning a non-zero exit code.") |
301 | if return_value == 0: | 303 | if return_value == 0: |
302 | return_value = 1 | 304 | return_value = 1 |