]> 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>
Wed, 11 Jan 2017 11:46:41 +0000 (11:46 +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.

(From OE-Core rev: b8c35fcad57810a87aa25ebeb533adf286eed565)

Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
scripts/lib/wic/partition.py

index 30bb05a2499adf6f20c341e55f895604026a6234..3b3bd2d78ff41e27cd4ddecb06481e4ce9396f64 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)