On Thu, Apr 2, 2020, 3:15 PM Richard Purdie < [email protected]> wrote:
> 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 <[email protected]> > > --- > > 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. > Ya I was in a hurry, but I was imagining some sort of bb.utils.is_finalizing(d) to wrap the logic > 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 > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#136967): https://lists.openembedded.org/g/openembedded-core/message/136967 Mute This Topic: https://lists.openembedded.org/mt/72731348/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
