public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] wic: move out all files ending on "direct*"
@ 2021-04-08  8:05 Henning Schild
  2021-04-08  8:32 ` Jan Kiszka
  2021-04-16 14:21 ` Anton Mikanovich
  0 siblings, 2 replies; 5+ messages in thread
From: Henning Schild @ 2021-04-08  8:05 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

wic can compress images, in which case they would have a suffix
plus our new version of wic keeps individual partitions that might be
valuable to some, they also have a suffix we used to not move out

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/wic-img.bbclass | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 59dcd2b7c124..76606f882e79 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -193,10 +193,11 @@ EOSUDO
               ${WIC_CREATE_EXTRA_ARGS}
 
     sudo chown -R $(stat -c "%U" ${LAYERDIR_core}) ${LAYERDIR_core} ${LAYERDIR_isar} ${SCRIPTSDIR} || true
-    WIC_DIRECT=$(ls -t -1 ${BUILDCHROOT_DIR}/$WICTMP/${IMAGE_FULLNAME}.wic/*.direct | head -1)
     sudo chown -R $(id -u):$(id -g) ${BUILDCHROOT_DIR}/${WICTMP}
-    mv -f ${WIC_DIRECT} ${WIC_IMAGE_FILE}
-    mv -f ${WIC_DIRECT}.bmap ${WIC_IMAGE_FILE}.bmap
+    find ${BUILDCHROOT_DIR}/${WICTMP} -type f -name "*.direct*" | while read f; do
+        suffix=$(basename $f | sed 's/\(.*\)\(\.direct\)\(.*\)/\3/')
+        mv -f ${f} ${WIC_IMAGE_FILE}${suffix}
+    done
     rm -rf ${BUILDCHROOT_DIR}/${WICTMP}
     rm -rf ${IMAGE_ROOTFS}/../pseudo
 }
-- 
2.26.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-19  8:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  8:05 [PATCH] wic: move out all files ending on "direct*" Henning Schild
2021-04-08  8:32 ` Jan Kiszka
2021-04-08  8:44   ` Henning Schild
2021-04-08  8:49     ` Jan Kiszka
2021-04-16 14:21 ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox