[PATCH 17/21] Remove shrink code that was a workaround for the old ui flow.
David Lehman
dlehman at redhat.com
Thu Aug 9 19:28:36 UTC 2012
---
pyanaconda/storage/__init__.py | 1 -
pyanaconda/storage/partitioning.py | 16 ----------------
2 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index ee4e20c..881dc0c 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -354,7 +354,6 @@ class Storage(object):
self.autoPartAddBackupPassphrase = False
self.encryptionRetrofit = False
self.autoPartitionRequests = []
- self.shrinkPartitions = {}
self.eddDict = {}
self.__luksDevs = {}
diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index bff6d43..8ba4591 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -265,19 +265,6 @@ def _scheduleVolumes(storage, devs):
# schedule the device for creation
storage.createDevice(dev)
-def scheduleShrinkActions(storage):
- """ Schedule actions to shrink partitions as per autopart selection. """
- for (path, size) in storage.shrinkPartitions.items():
- device = storage.devicetree.getDeviceByPath(path, preferLeaves=False)
- if not device or not isinstance(device, PartitionDevice):
- raise StorageError("device %s scheduled for shrink disappeared"
- % path)
- storage.devicetree.registerAction(ActionResizeFormat(device, size))
- storage.devicetree.registerAction(ActionResizeDevice(device, size))
- # aligning the partition's new end sector may have changed the size
- if device.targetSize != size:
- device.format.targetSize = device.targetSize
-
def doAutoPartition(storage, data):
log.debug("doAutoPart: %s" % storage.doAutoPart)
log.debug("encryptedAutoPart: %s" % storage.encryptedAutoPart)
@@ -294,9 +281,6 @@ def doAutoPartition(storage, data):
devs = []
if storage.doAutoPart:
- # XXX this doesn't belong on newui
- scheduleShrinkActions(storage)
-
disks = _getCandidateDisks(storage)
devs = _scheduleImplicitPartitions(storage, disks)
log.debug("candidate disks: %s" % disks)
--
1.7.7.6
More information about the anaconda-patches
mailing list