[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4657/8267] wic: direct: move creation of PartitionedImage to __init__



commit 01b9ab89dea3b8ab9781b7d06e5024106ced1dd0
Author: Ed Bartosh <ed bartosh linux intel com>
Date:   Fri Feb 10 16:44:03 2017 +0200

    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>

 scripts/lib/wic/plugins/imager/direct.py |    8 ++++----
 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 c517904..481d24d 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -81,6 +81,10 @@ class DirectPlugin(ImagerPlugin):
                 self.ks.bootloader.source = part.source
                 break
 
+        image_path = self._full_path(self.workdir, self.parts[0].disk, "direct")
+        self._image = PartitionedImage(image_path, self.ptable_format,
+                                       self.parts, self.native_sysroot)
+
     def do_create(self):
         """
         Plugin entry point.
@@ -150,10 +154,6 @@ class DirectPlugin(ImagerPlugin):
         filesystems from the artifacts directly and combine them into
         a partitioned image.
         """
-        image_path = self._full_path(self.workdir, self.parts[0].disk, "direct")
-        self._image = PartitionedImage(image_path, self.ptable_format,
-                                       self.parts, self.native_sysroot)
-
         fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
         for part in self.parts:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]