[Buildroot] [PATCH v4 1/5] autobuild-run: check if reproducibile_results exists before checking its size
Arnout Vandecappelle
arnout at mind.be
Sun Sep 8 16:43:14 UTC 2019
On 20/08/2019 16:52, Atharva Lele wrote:
> This was causing some reproducible configs to crash autobuild script since it
> tried to check the size of a file that did not exist.
How does it happen that it doesn't exist? A few lines above, we have:
with open(reproducible_results, 'w') as diff:
..
This will create the file, even if nothing is written to it.
Or maybe this issue only occurs after patch 4 has been applied?
Regards,
Arnout
>
> Signed-off-by: Atharva Lele <itsatharva at gmail.com>
> ---
> scripts/autobuild-run | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/autobuild-run b/scripts/autobuild-run
> index ead81a0..99b57dd 100755
> --- a/scripts/autobuild-run
> +++ b/scripts/autobuild-run
> @@ -461,7 +461,7 @@ class Builder:
> log_write(self.log, "INFO: diffoscope not installed, falling back to cmp")
> subprocess.call(["cmp", "-b", build_1_image, build_2_image], stdout=diff, stderr=self.log)
>
> - if os.stat(reproducible_results).st_size > 0:
> + if os.path.exists(reproducible_results) and os.stat(reproducible_results).st_size > 0:
> log_write(self.log, "INFO: Build is non-reproducible.")
> return -1
>
>
More information about the buildroot
mailing list