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(+) 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 -- 2.17.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#136961): https://lists.openembedded.org/g/openembedded-core/message/136961 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]] -=-=-=-=-=-=-=-=-=-=-=-
