[v2,3/3] image: disable clean-log-files ROOTFS_FEATURES for deb-src caching

Message ID 20250307122558.1882902-3-srinuvasan.a@siemens.com
State New
Headers show
Series [v2,1/3] mmdebstrap: add "skip=cleanup/reproducible" option to mmdebstrap | expand

Commit Message

srinuvasan.a March 7, 2025, 12:25 p.m. UTC
From: srinuvasan <srinuvasan.a@siemens.com>

By default the /var/log/dpkg.log file is removed as part of
rootfs postprocessing in the regular image builds, but this is
needed to get the IMAGE_ROOTFS related deb-src packages during debian source caching,
hence make this feature like a configurable one rather than enabled by default.

Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
 meta/classes/image.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 66b4d313..94ecef86 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -66,7 +66,8 @@  inherit multiarch
 inherit essential
 
 ROOTFSDIR = "${IMAGE_ROOTFS}"
-ROOTFS_FEATURES += "clean-package-cache clean-pycache generate-manifest export-dpkg-status clean-log-files clean-debconf-cache"
+ROOTFS_FEATURES += "clean-package-cache clean-pycache generate-manifest export-dpkg-status clean-debconf-cache"
+ROOTFS_FEATURES += "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-deb-src', '', 'clean-log-files', d)}"
 ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${@isar_multiarch_packages('IMAGE_INSTALL', d)}"
 ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}"
 ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}"