From: <daniel.turull@ericsson.com>
To: <openembedded-core@lists.openembedded.org>
Cc: <JPEWhacker@gmail.com>, <mathieu.dubois-briand@bootlin.com>,
Daniel Turull <daniel.turull@ericsson.com>
Subject: [PATCH v3 1/3] classes/base: exclude __CACHED_SOURCE_DATE_EPOCH from task hash
Date: Mon, 28 Sep 2026 21:03:58 +0200 [thread overview]
Message-ID: <20260928190400.3908822-2-daniel.turull@ericsson.com> (raw)
In-Reply-To: <20260928190400.3908822-1-daniel.turull@ericsson.com>
From: Daniel Turull <daniel.turull@ericsson.com>
epochfile_read() memoizes its result into __CACHED_SOURCE_DATE_EPOCH
via d.setVar(), so its runtime value leaks into the basehash of any
task that calls it, causing a "metadata is not deterministic" error
once SDE_FILE is populated.
Exclude it, since it is not meaningful build metadata.
AI-Generated: Uses Kiro with Claude Sonnet 5
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
This should fix the selftest errors reported by Mathieu
---
meta/classes-global/base.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index 9553f00432..01a030399e 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -249,6 +249,10 @@ do_unpack[postfuncs] += "create_source_date_epoch_stamp"
def get_source_date_epoch_value(d):
return oe.reproducible.epochfile_read(d.getVar('SDE_FILE'), d)
+# epochfile_read() memoizes into this variable via d.setVar(), so its
+# runtime value must not leak into any task's hash.
+oe.reproducible.epochfile_read[vardepsexclude] = "__CACHED_SOURCE_DATE_EPOCH"
+
def get_layers_branch_rev(d):
revisions = oe.buildcfg.get_layer_revisions(d)
layers_branch_rev = ["%-20s = \"%s:%s\"" % (r[1], r[2], r[3]) for r in revisions]
next prev parent reply other threads:[~2026-09-28 19:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 19:03 [PATCH v3 0/3] spdx: add support to include releaseTime daniel.turull
2026-09-28 19:03 ` daniel.turull [this message]
2026-09-29 14:53 ` [PATCH v3 1/3] classes/base: exclude __CACHED_SOURCE_DATE_EPOCH from task hash Joshua Watt
2026-09-28 19:03 ` [PATCH v3 2/3] create-spdx-3.0: record component release date in SPDX output daniel.turull
2026-09-28 20:59 ` [OE-core] " Richard Purdie
2026-09-29 4:54 ` Daniel Turull
2026-09-28 19:04 ` [PATCH v3 3/3] scripts/contrib: add spdx-release-date-report.py daniel.turull
2026-09-29 6:16 ` [OE-core] [PATCH v3 0/3] spdx: add support to include releaseTime Yoann Congal
2026-09-29 6:36 ` Daniel Turull
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=20260928190400.3908822-2-daniel.turull@ericsson.com \
--to=daniel.turull@ericsson.com \
--cc=JPEWhacker@gmail.com \
--cc=mathieu.dubois-briand@bootlin.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