From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 3/3] autobuild-run: do reproducible builds tests if BR2_REPRODUCIBLE=y
Date: Fri, 14 Jun 2019 22:35:54 +0200 [thread overview]
Message-ID: <20190614203554.GP2647@scaer> (raw)
In-Reply-To: <b7f3b46f-6be2-615a-108e-2197111460d3@mind.be>
Arnout, All,
On 2019-06-14 10:47 +0200, Arnout Vandecappelle spake thusly:
> 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 :-)
Well, if we use a language, we should write with the idioms of that
language. Python is not C, so we should not write Python as we would C.
That notwithstanding, I'm no Python expert either, so I'm also OK with
the more "traditional and conventional" ways. ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2019-06-14 20:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 12:34 [Buildroot] [PATCH v3 1/3] autobuild-run: initial implementation of check_reproducibility() Atharva Lele
2019-06-11 12:34 ` [Buildroot] [PATCH v3 2/3] autobuild-run: initial implementation of do_reproducible_build() Atharva Lele
2019-06-13 20:13 ` Yann E. MORIN
2019-06-14 7:58 ` Arnout Vandecappelle
2019-06-14 8:47 ` Atharva Lele
2019-06-11 12:34 ` [Buildroot] [PATCH v3 3/3] autobuild-run: do reproducible builds tests if BR2_REPRODUCIBLE=y Atharva Lele
2019-06-13 20:23 ` Yann E. MORIN
2019-06-14 8:46 ` Atharva Lele
2019-06-14 8:47 ` Arnout Vandecappelle
2019-06-14 8:53 ` Atharva Lele
2019-06-14 20:35 ` Yann E. MORIN [this message]
2019-06-13 19:53 ` [Buildroot] [PATCH v3 1/3] autobuild-run: initial implementation of check_reproducibility() Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190614203554.GP2647@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox