From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Joshua Watt <JPEWhacker@gmail.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] classes/reproducible_build: Skip SDE for non-finalizing virtual recipes
Date: Thu, 02 Apr 2020 21:15:17 +0100 [thread overview]
Message-ID: <7c6f84dd795b37bbabc594cc90683405933e3063.camel@linuxfoundation.org> (raw)
In-Reply-To: <20200402180832.12814-1-JPEWhacker@gmail.com>
On Thu, 2020-04-02 at 13:08 -0500, Joshua Watt wrote:
> Don't capture the source date epoch for recipes that are not being
> finalized. This prevents a virtual recipe (e.g. multilib) from
> attempting to read the source date epoch file from the non-virtual
> recipes workdir.
>
> [YOCTO #13851]
>
> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
> meta/classes/reproducible_build.bbclass | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
Thanks, its a start. Unfortunately it pokes or assumes far too much
knowledge of bitbake internals so we'll have to come up with something
neater.
I'll give this some further thought.
Cheers,
Richard
> diff --git a/meta/classes/reproducible_build.bbclass
> b/meta/classes/reproducible_build.bbclass
> index 8da40f656a..48ec9108a5 100644
> --- a/meta/classes/reproducible_build.bbclass
> +++ b/meta/classes/reproducible_build.bbclass
> @@ -172,6 +172,20 @@ python create_source_date_epoch_stamp() {
> }
>
> def get_source_date_epoch_value(d):
> + onlyfinalize = d.getVar('__ONLYFINALISE')
> + virtual = "%s:%s" % (d.getVar("BBEXTENDCURR") or "",
> d.getVar("BBEXTENDVARIANT") or "")
> +
> + if onlyfinalize == "default":
> + onlyfinalize = ":"
> +
> + # Only capture the source date epoch if the current virtual
> recipe is the
> + # one being finalized. This prevents looking for the SDE file in
> another
> + # recipes ${WORKDIR}, where it may or may not exist
> + if onlyfinalize:
> + if onlyfinalize != virtual:
> + bb.debug(2, "Skipping SOURCE_DATE_EPOCH: virtual '%s' !=
> finalize '%s'" % (virtual, onlyfinalize))
> + return 0
> +
> cached = d.getVar('__CACHED_SOURCE_DATE_EPOCH')
> if cached:
> return cached
>
next prev parent reply other threads:[~2020-04-02 20:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 18:08 [OE-core][PATCH] classes/reproducible_build: Skip SDE for non-finalizing virtual recipes Joshua Watt
2020-04-02 20:15 ` Richard Purdie [this message]
2020-04-02 23:04 ` Joshua Watt
2020-04-02 20:42 ` Richard Purdie
2020-04-02 23:09 ` Joshua Watt
2020-04-03 14:34 ` Joshua Watt
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=7c6f84dd795b37bbabc594cc90683405933e3063.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=JPEWhacker@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/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