diff options
author | Maciej Borzecki <maciej.borzecki@rndity.com> | 2016-11-10 13:18:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-15 15:19:55 +0000 |
commit | 294410cce3569fa4c29c2bbc300435303fee2050 (patch) | |
tree | 91295c9da324267a0f11062503084455b01e770e /scripts/lib/wic/partition.py | |
parent | b92de9a6db042e821bd26d1a2ee23f733ffc9214 (diff) | |
download | poky-294410cce3569fa4c29c2bbc300435303fee2050.tar.gz |
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.
(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>
Diffstat (limited to 'scripts/lib/wic/partition.py')
-rw-r--r-- | scripts/lib/wic/partition.py | 4 |
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(): | |||
190 | if os.path.isfile(rootfs): | 190 | if os.path.isfile(rootfs): |
191 | os.remove(rootfs) | 191 | os.remove(rootfs) |
192 | 192 | ||
193 | if not self.fstype: | ||
194 | msger.error("File system for partition %s not specified in kickstart, " \ | ||
195 | "use --fstype option" % (self.mountpoint)) | ||
196 | |||
193 | for prefix in ("ext", "btrfs", "vfat", "squashfs"): | 197 | for prefix in ("ext", "btrfs", "vfat", "squashfs"): |
194 | if self.fstype.startswith(prefix): | 198 | if self.fstype.startswith(prefix): |
195 | method = getattr(self, "prepare_rootfs_" + prefix) | 199 | method = getattr(self, "prepare_rootfs_" + prefix) |