[oe-commits] [openembedded-core] 05/23: wic: fix bug in handling fsoptions

git at git.openembedded.org git at git.openembedded.org
Thu Apr 14 09:59:11 UTC 2016


rpurdie pushed a commit to branch krogoth
in repository openembedded-core.

commit be7ff1741e8ab5f2724b3f64da1bed8b0d3dcb7c
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Wed Apr 13 10:25:31 2016 +0300

    wic: fix bug in handling fsoptions
    
    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 at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/lib/wic/utils/partitionedfs.py | 36 ++++++++++++++++------------------
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py
index 5a103bb..ad596d2 100644
--- a/scripts/lib/wic/utils/partitionedfs.py
+++ b/scripts/lib/wic/utils/partitionedfs.py
@@ -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

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list