diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-02-08 20:51:30 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-02-15 20:06:44 -0800 |
commit | a9be5de4a169a6fed66a8ffe7f662947516e4b89 (patch) | |
tree | ccfbfbd1f4391480f77758db2a261302b738776d /scripts | |
parent | fd1f6fb201804ffa593f0e7dceaccb15ad189a1e (diff) | |
download | poky-a9be5de4a169a6fed66a8ffe7f662947516e4b89.tar.gz |
wic: make sure layout_partitions is called once
Removed artificial _partitions_layed_out attribute and
unneeded call of layout_partitions method.
(From OE-Core rev: 702772edc839c220140ac0572bb14b4e44c81c1c)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/wic/utils/partitionedfs.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/scripts/lib/wic/utils/partitionedfs.py b/scripts/lib/wic/utils/partitionedfs.py index fb5c0c2f0a..5397bb704c 100644 --- a/scripts/lib/wic/utils/partitionedfs.py +++ b/scripts/lib/wic/utils/partitionedfs.py | |||
@@ -46,7 +46,6 @@ class Image(): | |||
46 | self.partimages = [] | 46 | self.partimages = [] |
47 | # Size of a sector used in calculations | 47 | # Size of a sector used in calculations |
48 | self.sector_size = SECTOR_SIZE | 48 | self.sector_size = SECTOR_SIZE |
49 | self._partitions_layed_out = False | ||
50 | self.native_sysroot = native_sysroot | 49 | self.native_sysroot = native_sysroot |
51 | 50 | ||
52 | def _add_disk(self, disk_name): | 51 | def _add_disk(self, disk_name): |
@@ -58,8 +57,6 @@ class Image(): | |||
58 | # We already have this disk | 57 | # We already have this disk |
59 | return | 58 | return |
60 | 59 | ||
61 | assert not self._partitions_layed_out | ||
62 | |||
63 | self.disks[disk_name] = \ | 60 | self.disks[disk_name] = \ |
64 | {'disk': None, # Disk object | 61 | {'disk': None, # Disk object |
65 | 'numpart': 0, # Number of allocate partitions | 62 | 'numpart': 0, # Number of allocate partitions |
@@ -90,8 +87,6 @@ class Image(): | |||
90 | # Converting kB to sectors for parted | 87 | # Converting kB to sectors for parted |
91 | part.size_sec = part.disk_size * 1024 // self.sector_size | 88 | part.size_sec = part.disk_size * 1024 // self.sector_size |
92 | 89 | ||
93 | assert not self._partitions_layed_out | ||
94 | |||
95 | self.partitions.append(part) | 90 | self.partitions.append(part) |
96 | self._add_disk(part.disk) | 91 | self._add_disk(part.disk) |
97 | 92 | ||
@@ -102,11 +97,6 @@ class Image(): | |||
102 | 97 | ||
103 | msger.debug("Assigning %s partitions to disks" % ptable_format) | 98 | msger.debug("Assigning %s partitions to disks" % ptable_format) |
104 | 99 | ||
105 | if self._partitions_layed_out: | ||
106 | return | ||
107 | |||
108 | self._partitions_layed_out = True | ||
109 | |||
110 | # Go through partitions in the order they are added in .ks file | 100 | # Go through partitions in the order they are added in .ks file |
111 | for num in range(len(self.partitions)): | 101 | for num in range(len(self.partitions)): |
112 | part = self.partitions[num] | 102 | part = self.partitions[num] |
@@ -219,8 +209,6 @@ class Image(): | |||
219 | disk = self.disks[dev] | 209 | disk = self.disks[dev] |
220 | disk['disk'].create() | 210 | disk['disk'].create() |
221 | 211 | ||
222 | self.layout_partitions() | ||
223 | |||
224 | for dev in self.disks: | 212 | for dev in self.disks: |
225 | disk = self.disks[dev] | 213 | disk = self.disks[dev] |
226 | msger.debug("Initializing partition table for %s" % \ | 214 | msger.debug("Initializing partition table for %s" % \ |