[PATCH] Fix post-commit lookup of extended partitions. (#737532)

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

 



Commit 7ccd9ce9d6a907c switched to doing these lookups by sector,
but did not take into account the fact that lookups by sector do
not work for extended partitions. Another reason to love msdos
labels.
---
 pyanaconda/storage/devices.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index 9aa77a6..a52e464 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -1484,8 +1484,14 @@ class PartitionDevice(StorageDevice):
             raise
 
     def _postCreate(self):
-        start = self.partedPartition.geometry.start
-        partition = self.disk.format.partedDisk.getPartitionBySector(start)
+        if self.isExtended:
+            partition = self.disk.format.extendedPartition
+        else:
+            start = self.partedPartition.geometry.start
+            partition = self.disk.format.partedDisk.getPartitionBySector(start)
+
+        log.debug("post-commit partition path is %s" % getattr(partition,
+                                                               "path", None))
         self.partedPartition = partition
         if not self.isExtended:
             # Ensure old metadata which lived in freespace so did not get
-- 
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux