[PATCH] Update extended partition geometry when we change it

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

 



If there was no extended partition originally and we create one, we create
the device for it, but if it changes after that (manual partitioning), we
do not update the created device with the new geometry, leading to a
backtrace with an overlapping partition error when the partition gets
written to the disk.
---
 storage/partitioning.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index 888a69d..65d2e7d 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -568,8 +568,11 @@ def doPartitioning(storage, exclusiveDisks=None):
             continue
 
         extendedName = devicePathToName(extended.getDeviceNodeName())
-        if extendedName in [p.name for p in partitions]:
-            # this extended partition is preexisting
+        device = storage.devicetree.getDeviceByName(extendedName)
+        if device:
+            if not device.exists:
+                # created by us, update partedPartition
+                device.partedPartition = extended
             continue
 
         # This is a little odd because normally instantiating a partition
-- 
1.6.2

_______________________________________________
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