diff mbox series

[v2,2/2] wic: fix wrong attempt to create file system in unpartitioned regions

Message ID 20230821101545.3351643-3-Markus.Niebel@ew.tq-group.com
State New
Headers show
Series [v2,1/2] oeqa: wic: Add test for --no-table option | expand

Commit Message

Markus Niebel Aug. 21, 2023, 10:15 a.m. UTC
The kickstart parser defaults fstype to "vfat". This leads to an attempt
to create an empty file system even for regions configured with "--no-table"
if used without fstype when no --sourceparams given.

The fix tests for fstype "none" or no_table in Partition prepare method.
This will omit the file system creation an the potential error for small
region with --no-table option.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
---

v2: fix typo in description

 scripts/lib/wic/partition.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index bda4aef1b4..f11c393df5 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -134,7 +134,7 @@  class Partition():
             self.update_fstab_in_rootfs = True
 
         if not self.source:
-            if self.fstype == "none":
+            if self.fstype == "none" or self.no_table:
                 return
             if not self.size and not self.fixed_size:
                 raise WicError("The %s partition has a size of zero. Please "