All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] buildman: Deal more nicely with invalid build-status file
@ 2019-04-27  1:02 Simon Glass
  2019-05-22 13:21 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Glass @ 2019-04-27  1:02 UTC (permalink / raw)
  To: u-boot

The 'done' files created by buildman may end up being empty if buildman
runs out of disk space while writing them. At present buildman dies with
an exception when using -s to check the build status. Fix this.

Seriesl-cc: trini

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/buildman/builder.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index 6a6c83bf336..fbb236676c7 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -673,7 +673,12 @@ class Builder:
         environment = {}
         if os.path.exists(done_file):
             with open(done_file, 'r') as fd:
-                return_code = int(fd.readline())
+                try:
+                    return_code = int(fd.readline())
+                except ValueError:
+                    # The file may be empty due to running out of disk space.
+                    # Try a rebuild
+                    return_code = 1
                 err_lines = []
                 err_file = self.GetErrFile(commit_upto, target)
                 if os.path.exists(err_file):
-- 
2.21.0.593.g511ec345e18-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] buildman: Deal more nicely with invalid build-status file
  2019-04-27  1:02 [U-Boot] [PATCH] buildman: Deal more nicely with invalid build-status file Simon Glass
@ 2019-05-22 13:21 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2019-05-22 13:21 UTC (permalink / raw)
  To: u-boot

On Fri, 26 Apr 2019 at 19:02, Simon Glass <sjg@chromium.org> wrote:
>
> The 'done' files created by buildman may end up being empty if buildman
> runs out of disk space while writing them. At present buildman dies with
> an exception when using -s to check the build status. Fix this.
>
> Seriesl-cc: trini
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  tools/buildman/builder.py | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Applied to u-boot-dm, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-22 13:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-27  1:02 [U-Boot] [PATCH] buildman: Deal more nicely with invalid build-status file Simon Glass
2019-05-22 13:21 ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.