]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: fix bug in handling fsoptions
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 13 Apr 2016 07:25:31 +0000 (10:25 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Apr 2016 09:58:27 +0000 (10:58 +0100)
Partitions specifying --fsoptions were silently skipped by wic
due to the old bug introduced when removing code related to
subvolume handling:

- if mountpoint == "/" or not fsopts or fsopts.find("subvol=") == -1
+ if mountpoint == "/" or not fsopts:

[YOCTO #9396]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/utils/partitionedfs.py

index 5a103bbc7e80f01d8bf482e0860c497552582410..ad596d26f2c3c07e0d475bab1dbbbfd65e4dc65b 100644 (file)
@@ -96,25 +96,23 @@ class Image(object):
         # Converting kB to sectors for parted
         size = size * 1024 / self.sector_size
 
-        # We still need partition for "/" or non-subvolume
-        if mountpoint == "/" or not fsopts:
-            part = {'ks_pnum': ks_pnum, # Partition number in the KS file
-                    'size': size, # In sectors
-                    'mountpoint': mountpoint, # Mount relative to chroot
-                    'source_file': source_file, # partition contents
-                    'fstype': fstype, # Filesystem type
-                    'fsopts': fsopts, # Filesystem mount options
-                    'label': label, # Partition label
-                    'disk_name': disk_name, # physical disk name holding partition
-                    'device': None, # kpartx device node for partition
-                    'num': None, # Partition number
-                    'boot': boot, # Bootable flag
-                    'align': align, # Partition alignment
-                    'no_table' : no_table, # Partition does not appear in partition table
-                    'part_type' : part_type, # Partition type
-                    'uuid': uuid} # Partition UUID
-
-            self.__add_partition(part)
+        part = {'ks_pnum': ks_pnum, # Partition number in the KS file
+                'size': size, # In sectors
+                'mountpoint': mountpoint, # Mount relative to chroot
+                'source_file': source_file, # partition contents
+                'fstype': fstype, # Filesystem type
+                'fsopts': fsopts, # Filesystem mount options
+                'label': label, # Partition label
+                'disk_name': disk_name, # physical disk name holding partition
+                'device': None, # kpartx device node for partition
+                'num': None, # Partition number
+                'boot': boot, # Bootable flag
+                'align': align, # Partition alignment
+                'no_table' : no_table, # Partition does not appear in partition table
+                'part_type' : part_type, # Partition type
+                'uuid': uuid} # Partition UUID
+
+        self.__add_partition(part)
 
     def layout_partitions(self, ptable_format="msdos"):
         """ Layout the partitions, meaning calculate the position of every