[gnome-continuous-yocto/gnomeostree-3.28-rocko: 7427/8267] wic: always read image partitions



commit 7724e6fff7b9afd2e24b4f20139e99199d53f1ce
Author: Ed Bartosh <ed bartosh linux intel com>
Date:   Fri Aug 25 23:12:28 2017 +0300

    wic: always read image partitions
    
    Got rid of lazy evaluation of self.partitions property.
    It's not needed because partitions of the source image should
    be always read.
    
    (From OE-Core rev: 1186fd8fd4a4789dc7c60feb86cc9fdd03fee7b3)
    
    Signed-off-by: Ed Bartosh <ed bartosh linux intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 scripts/lib/wic/engine.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 303f323..eafc6c7 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -254,12 +254,13 @@ class Disk:
         if not self.parted:
             raise WicError("Can't find executable parted")
 
+        self.partitions = self.get_partitions()
+
     def __del__(self):
         for path in self._partimages.values():
             os.unlink(path)
 
-    @property
-    def partitions(self):
+    def get_partitions(self):
         if self._partitions is None:
             self._partitions = OrderedDict()
             out = exec_cmd("%s -sm %s unit B print" % (self.parted, self.imagepath))


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