[v2,2/2] targz-img: Handle sparse files efficiently

Message ID 20220711071155.776897-3-adriaan.schmidt@siemens.com
State Accepted, archived
Headers show
Series Sparse tar generation | expand

Commit Message

Schmidt, Adriaan July 10, 2022, 11:11 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Saves space in case the image contains any sparse files.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
---
 meta/classes/imagetypes.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/classes/imagetypes.bbclass b/meta/classes/imagetypes.bbclass
index bea5af53..1e8e223d 100644
--- a/meta/classes/imagetypes.bbclass
+++ b/meta/classes/imagetypes.bbclass
@@ -8,7 +8,7 @@  IMAGER_INSTALL_tar = "tar"
 TAR_OPTIIONS ?= ""
 
 IMAGE_CMD_tar() {
-    ${SUDO_CHROOT} tar ${TAR_OPTIONS} -cvf \
+    ${SUDO_CHROOT} tar ${TAR_OPTIONS} -cvSf \
                  ${IMAGE_FILE_CHROOT} --one-file-system -C ${PP_ROOTFS} .
 }