]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: check that filesystem is specified for a rootfs partition
authorMaciej Borzecki <maciej.borzecki@rndity.com>
Thu, 10 Nov 2016 12:18:34 +0000 (13:18 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Nov 2016 15:18:50 +0000 (15:18 +0000)
We explicitly check for --fstype if no source was provided for a
partition. However, this was not the case for rootfs partitions. Make
sure to raise an error if filesystem was left unspecified when preparing
a rootfs partition image.

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/partition.py

index f3835339afc5091604ffd7f0d0acf1d1ad4351cc..ac4c836bdb53300d3a4e4c09926b7b1514b8faf2 100644 (file)
@@ -190,6 +190,10 @@ class Partition():
         if os.path.isfile(rootfs):
             os.remove(rootfs)
 
+        if not self.fstype:
+            msger.error("File system for partition %s not specified in kickstart, " \
+                        "use --fstype option" % (self.mountpoint))
+
         for prefix in ("ext", "btrfs", "vfat", "squashfs"):
             if self.fstype.startswith(prefix):
                 method = getattr(self, "prepare_rootfs_" + prefix)