[Buildroot] [PATCH v3 3/3] autobuild-run: do reproducible builds tests if BR2_REPRODUCIBLE=y
Arnout Vandecappelle
arnout at mind.be
Fri Jun 14 08:47:49 UTC 2019
On 14/06/2019 10:46, Atharva Lele wrote:
>> You need to do (basically):
>
>> with open(os.path.join(outputdir, ".config"), "r") as fconf:
>> reproducible = "BR2_REPRODUCIBLE=y\n" in fconf.read()
>> build = do_reproducible_build if reproducible else do_build
>> ret = build(**kwargs)
>
> It would still work if I just unindent the if-else block too right? This is what
> I actually intended to do
> It's working for me in testing..
> Like this:
>
> with open(os.path.join(outputdir, ".config"), "r") as fconf:
> reproducible = "BR2_REPRODUCIBLE=y\n" in fconf.read()
> if reproducible:
> ret = do_reproducible_build(**kwargs)
> else:
> ret = do_build(**kwargs)
Yes, and I prefer that version. Yann considers the '... if ... else ...'
construct more pythonese, but I kind of like explicit conditions :-)
Regards,
Arnout
[snip]
More information about the buildroot
mailing list