public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: isar-users@googlegroups.com
Cc: Henning Schild <henning.schild@siemens.com>
Subject: [PATCH] wic: move out all files ending on "direct*"
Date: Thu,  8 Apr 2021 10:05:21 +0200	[thread overview]
Message-ID: <20210408080521.32000-1-henning.schild@siemens.com> (raw)

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


             reply	other threads:[~2021-04-08  8:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  8:05 Henning Schild [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210408080521.32000-1-henning.schild@siemens.com \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox