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

Message ID 20260907113533.3937376-1-felix.moessbauer@siemens.com
State Under Review
Headers show
Series [1/1] rootfs: do not clean pycache for distros that build it reproducible | expand

Commit Message

Felix Moessbauer Sept. 7, 2026, 11:35 a.m. UTC
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.moessbauer@siemens.com>
---
 meta/classes-recipe/rootfs.bbclass | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

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