wic: use the same partition object in direct and partitionedfs

Partition attributes were copied to the dictionary in partitionedfs
code, which makes the code hard to follow.

Used partition object passed from direct.py module as is in
partitionedfs.

(From OE-Core rev: 97db24d34847a641868f9ee83aae56f9dd5e0a8a)

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>
This commit is contained in:
Ed Bartosh
2017-02-08 20:51:29 +02:00
committed by Richard Purdie
parent 4edcd63ba1
commit fd1f6fb201
3 changed files with 73 additions and 96 deletions

View File

@@ -237,14 +237,7 @@ class DirectPlugin(ImagerPlugin):
part.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir,
self.bootimg_dir, self.kernel_dir, self.native_sysroot)
self._image.add_partition(part.disk_size, part.disk,
part.mountpoint, part.source_file,
part.fstype, part.label,
fsopts=part.fsopts, boot=part.active,
align=part.align, no_table=part.no_table,
part_type=part.part_type, uuid=part.uuid,
system_id=part.system_id)
self._image.add_partition(part)
if fstab_path:
shutil.move(fstab_path + ".orig", fstab_path)