summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-02-10 16:44:03 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-15 20:06:45 -0800
commit01b9ab89dea3b8ab9781b7d06e5024106ced1dd0 (patch)
tree5b1bea0479cee11997af77da2440afc107f09933 /scripts/lib/wic
parent924e84ea8dea6b0f8bb724aa9fc84d4d851c2308 (diff)
downloadpoky-01b9ab89dea3b8ab9781b7d06e5024106ced1dd0.tar.gz
wic: direct: move creation of PartitionedImage to __init__
Moved creation of PartitionedImage object from DirectPlugin.create method to init. It makes the code a bit more readable and logical. (From OE-Core rev: 9f225ef5620f2e47e762b2fd16fa5f8d6f1f60fd) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index c517904ed1..481d24d5ba 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -81,6 +81,10 @@ class DirectPlugin(ImagerPlugin):
81 self.ks.bootloader.source = part.source 81 self.ks.bootloader.source = part.source
82 break 82 break
83 83
84 image_path = self._full_path(self.workdir, self.parts[0].disk, "direct")
85 self._image = PartitionedImage(image_path, self.ptable_format,
86 self.parts, self.native_sysroot)
87
84 def do_create(self): 88 def do_create(self):
85 """ 89 """
86 Plugin entry point. 90 Plugin entry point.
@@ -150,10 +154,6 @@ class DirectPlugin(ImagerPlugin):
150 filesystems from the artifacts directly and combine them into 154 filesystems from the artifacts directly and combine them into
151 a partitioned image. 155 a partitioned image.
152 """ 156 """
153 image_path = self._full_path(self.workdir, self.parts[0].disk, "direct")
154 self._image = PartitionedImage(image_path, self.ptable_format,
155 self.parts, self.native_sysroot)
156
157 fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) 157 fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
158 158
159 for part in self.parts: 159 for part in self.parts: