do_rootfs marks REPRODUCIBLE_TIMESTAMP_ROOTFS for export, but that only
reaches the shell functions it emits afterwards. The task's environment
is fixed when it starts, so the postinst intercepts, which run from it,
never see the timestamp every file in the image will end up with. Set it
alongside D and STAGING_DIR_NATIVE.
AI-Generated: Claude Opus 5.5 (Claude Code)
---
meta/lib/oe/package_manager/__init__.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/lib/oe/package_manager/__init__.py
b/meta/lib/oe/package_manager/__init__.py
index 88bc5ab19520..76289c911b0b 100644
--- a/meta/lib/oe/package_manager/__init__.py
+++ b/meta/lib/oe/package_manager/__init__.py
@@ -223,6 +223,12 @@ class PackageManager(object, metaclass=ABCMeta):
bb.note("Running intercept scripts:")
os.environ['D'] = self.target_rootfs
os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
+ # The mtime every file in the image will end with; intercepts that
+ # record an mtime need it, and do_rootfs only exports it to shell
+ # functions it emits, not to the environment they run in.
+ timestamp = self.d.getVar('REPRODUCIBLE_TIMESTAMP_ROOTFS')
+ if timestamp:
+ os.environ['REPRODUCIBLE_TIMESTAMP_ROOTFS'] = timestamp
for script in os.listdir(intercepts_dir):
script_full = os.path.join(intercepts_dir, script)
--
2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#247717):
https://lists.openembedded.org/g/openembedded-core/message/247717
Mute This Topic: https://lists.openembedded.org/mt/121730204/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-