[1/1] sdk: remove isar-apt before running configscript

Message ID 20260909063908.1292693-1-felix.moessbauer@siemens.com
State New
Headers show
Series [1/1] sdk: remove isar-apt before running configscript | expand

Commit Message

Felix Moessbauer Sept. 9, 2026, 6:39 a.m. UTC
When using SDK_INCLUDE_ISAR_APT=0, the generated rootfs should not
include any traces of the isar-apt. However, as the config script runs
prior to the cleanup of the isar-apt, the apt-get update still has the
apt source list reference and leaks data into the sdk.

We fix this by explicitly dropping the isar-apt prior to running the
configure script.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes-recipe/sdk.bbclass | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/meta/classes-recipe/sdk.bbclass b/meta/classes-recipe/sdk.bbclass
index ca38cfc3..543df84b 100644
--- a/meta/classes-recipe/sdk.bbclass
+++ b/meta/classes-recipe/sdk.bbclass
@@ -81,6 +81,7 @@  sdkchroot_configscript () {
         chroot ${ROOTFSDIR} /configscript.sh ${DISTRO_ARCH}
 EOF
 }
+ROOTFS_POSTPROCESS_COMMAND:prepend:class-sdk = "${@'' if bb.utils.to_boolean(d.getVar('SDK_INCLUDE_ISAR_APT')) else 'rootfs_cleanup_isar_apt'} "
 
 ROOTFS_POSTPROCESS_COMMAND:append:class-sdk = " sdkchroot_finalize"
 sdkchroot_finalize() {