summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Borzecki <maciej.borzecki@rndity.com>2016-11-10 13:18:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-15 15:18:50 +0000
commitb8c35fcad57810a87aa25ebeb533adf286eed565 (patch)
tree6954e1db093c1ca0cd56385ccb94ff8a0cfea7b3
parent0bf686739a5e8a1193f5be5aa60afbf2ea1e5074 (diff)
downloadopenembedded-core-contrib-b8c35fcad57810a87aa25ebeb533adf286eed565.tar.gz
openembedded-core-contrib-b8c35fcad57810a87aa25ebeb533adf286eed565.tar.bz2
openembedded-core-contrib-b8c35fcad57810a87aa25ebeb533adf286eed565.zip
wic: check that filesystem is specified for a rootfs partition
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>
-rw-r--r--scripts/lib/wic/partition.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index f3835339af..ac4c836bdb 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -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)