diff mbox series

[isar-cip-core,2/4] make swupdate class compatible with schroot imaging

Message ID 20231008031529.1338834-3-felix.moessbauer@siemens.com (mailing list archive)
State Superseded
Headers show
Series make compatible with latest ISAR revision | expand

Commit Message

Felix Moessbauer Oct. 8, 2023, 3:15 a.m. UTC
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 classes/swupdate.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/classes/swupdate.bbclass b/classes/swupdate.bbclass
index aedaf02..55dad32 100644
--- a/classes/swupdate.bbclass
+++ b/classes/swupdate.bbclass
@@ -106,7 +106,7 @@  IMAGE_CMD:swu() {
     # Prepare for signing
     export sign='${@'x' if bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}'
 
-    sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
+    imager_run -p -d ${PP_WORK} <<'EOIMAGER'
         # Fill in file check sums
         for file in ${SWU_ADDITIONAL_FILES}; do
             sed -i "s:$file-sha256:$(sha256sum "${PP_WORK}/swu/"$file | cut -f 1 -d " "):g" \
@@ -138,7 +138,8 @@  IMAGE_CMD:swu() {
                 fi
                 echo "$file.${SWU_SIGNATURE_EXT}"
            fi
-        done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}"'
+        done | cpio -ovL --reproducible -H crc > "${SWU_BUILDCHROOT_IMAGE_FILE}"
+EOIMAGER
 }
 
 python do_check_swu_partition_uuids() {