]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
wic: Remove conflicting du parameters
authorMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Sun, 23 Nov 2025 07:24:47 +0000 (08:24 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Nov 2025 17:44:08 +0000 (17:44 +0000)
Current du parameters used in wic scripts are conflicting: -b implies
--block-size=1 while -k implies --block-size=1K. When both parameters
are used, coreutils du and uutils du do not react similarly, leading to
failures on Ubuntu 25.10.

As we do want to use the 1K block size, remove -b and add
--apparent-size that was implied by it, so we have a predictable
behaviour.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/partition.py
scripts/lib/wic/plugins/source/bootimg_efi.py
scripts/lib/wic/plugins/source/bootimg_pcbios.py
scripts/lib/wic/plugins/source/isoimage_isohybrid.py
scripts/lib/wic/plugins/source/rawcopy.py

index 531ac6eb3d4aaf9941a92cb888c5bf0c3d6ffd31..9c09816e5d3559c2ce2a062945e3cdb543e63e8f 100644 (file)
@@ -275,7 +275,7 @@ class Partition():
         self.source_file = rootfs
 
         # get the rootfs size in the right units for kickstart (kB)
-        du_cmd = "du -Lbks %s" % rootfs
+        du_cmd = "du --apparent-size -Lks %s" % rootfs
         out = exec_cmd(du_cmd)
         self.size = int(out.split()[0])
 
index ba520cd78b069dd0c1e6ebf06191ca0408181c78..99cc34454cadfda6f2bdc7a56385acbdb01197d6 100644 (file)
@@ -427,7 +427,7 @@ class BootimgEFIPlugin(SourcePlugin):
         chmod_cmd = "chmod 644 %s" % bootimg
         exec_cmd(chmod_cmd)
 
-        du_cmd = "du -Lbks %s" % bootimg
+        du_cmd = "du --apparent-size -Lks %s" % bootimg
         out = exec_cmd(du_cmd)
         bootimg_size = out.split()[0]
 
index caabda6318d0a7ce8c72d2f556d733b21436c416..8f34c926ebbbd9745220589270b2294d8a7bff8a 100644 (file)
@@ -305,7 +305,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
         chmod_cmd = "chmod 644 %s" % bootimg
         exec_cmd(chmod_cmd)
 
-        du_cmd = "du -Lbks %s" % bootimg
+        du_cmd = "du --apparent-size -Lks %s" % bootimg
         out = exec_cmd(du_cmd)
         bootimg_size = out.split()[0]
 
index 5d42eb5d3e86e6991d10dd86db95d1f573e038e5..40018dc7eacf8c6cd654a9a8fa361818a8195a9d 100644 (file)
@@ -429,7 +429,7 @@ class IsoImagePlugin(SourcePlugin):
 
         shutil.rmtree(isodir)
 
-        du_cmd = "du -Lbks %s" % iso_img
+        du_cmd = "du --apparent-size -Lks %s" % iso_img
         out = exec_cmd(du_cmd)
         isoimg_size = int(out.split()[0])
 
index 21903c2f23df83ab42c9a1900dc6b36f69565729..698413b2215a8e7b80d681587dd6fb6efc22c0f1 100644 (file)
@@ -102,7 +102,7 @@ class RawCopyPlugin(SourcePlugin):
             sparse_copy(src, dst)
 
         # get the size in the right units for kickstart (kB)
-        du_cmd = "du -Lbks %s" % dst
+        du_cmd = "du --apparent-size -Lks %s" % dst
         out = exec_cmd(du_cmd)
         filesize = int(out.split()[0])