[4/6] rootfs: also purge package changelogs on exclude-docs

Message ID 20260924073811.4058349-5-felix.moessbauer@siemens.com
State Under Review
Headers show
Series Model isar-exclude-docs as rootfs feature | expand

Commit Message

MOESSBAUER, Felix Sept. 24, 2026, 7:38 a.m. UTC
These can be quite big and usually do not provide value in a
docu-less system.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 RECIPE-API-CHANGELOG.md            | 3 +++
 meta/classes-recipe/rootfs.bbclass | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 0c98a33e..3798a9d1 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -1222,3 +1222,6 @@  recipe, we provide the `IMAGE_ROOTFS_FEATURES`.
 The `isar-exclude-docs` package provided mechanisms to remove documentation from
 the rootfs. This has been replaced by the `exclude-docs` rootfs feature. The
 `isar-exclude-docs` package should no longer be used.
+
+When enabled, the package changelogs are now removed as well (copyright is still
+kept for legal reasons).
diff --git a/meta/classes-recipe/rootfs.bbclass b/meta/classes-recipe/rootfs.bbclass
index 771d9b2e..79bd70b2 100644
--- a/meta/classes-recipe/rootfs.bbclass
+++ b/meta/classes-recipe/rootfs.bbclass
@@ -319,7 +319,7 @@  rootfs_exclude_docs_drop() {
         find '${ROOTFSDIR}/usr/share/man/' -depth -mindepth 1 -type d -empty -delete
     fi
     if [ -d '${ROOTFSDIR}/usr/share/doc' ]; then
-        find '${ROOTFSDIR}/usr/share/doc/' -mindepth 1 ! -type d ! -name "copyright" ! -name "changelog.*" -delete
+        find '${ROOTFSDIR}/usr/share/doc/' -mindepth 1 ! -type d ! -name "copyright" -delete
         find '${ROOTFSDIR}/usr/share/doc/' -depth -mindepth 1 -type d -empty -delete
     fi
 }
@@ -333,7 +333,6 @@  rootfs_configure_exclude_docs_filter() {
 path-exclude=/usr/share/man/*
 path-exclude=/usr/share/doc/*
 path-include=/usr/share/doc/*/copyright
-path-include=/usr/share/doc/*/changelog.*
 EOF
 
 EOSUDO