[PATCH 1/1] rootfs: do not clean pycache for distros that build it reproducible

1 view
Skip to first unread message

Felix Moessbauer

unread,
Sep 7, 2026, 7:35:49 AM (4 days ago) Sep 7
to isar-...@googlegroups.com, jan.k...@siemens.com, Felix Moessbauer
The reproducible builds issues in the pycache have finally been solved
and the corresponding fixes are available from bookworm on.
By that, we no longer drop the pycache for distros that build it
reproducibly, as this speeds up first-time invocations of python tools
in the rootfs. This is especially relevant in cases where the pycache
cannot be written at all, e.g. because the rootfs is read only mounted.

Signed-off-by: Felix Moessbauer <felix.mo...@siemens.com>
---
meta/classes-recipe/rootfs.bbclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
index cf996f5c..20ce7d83 100644
--- a/meta/classes-recipe/rootfs.bbclass
+++ b/meta/classes-recipe/rootfs.bbclass
@@ -46,8 +46,11 @@ ROOTFS_FEATURES_REPRODUCIBLE = " \
clean-package-cache \
clean-log-files \
clean-debconf-cache \
- clean-pycache \
"
+ROOTFS_FEATURES_REPRODUCIBLE:append:buster = " clean-pycache"
+ROOTFS_FEATURES_REPRODUCIBLE:append:bullseye = " clean-pycache"
+ROOTFS_FEATURES_REPRODUCIBLE:append:focal = " clean-pycache"
+
ROOTFS_FEATURES += "${ROOTFS_FEATURES_REPRODUCIBLE}"

# only supported from bookworm / jammy on
--
2.55.0

Reply all
Reply to author
Forward
0 new messages