[PATCH 4/8] Handle encrypted partitions in size set classes.
David Lehman
dlehman at redhat.com
Tue Oct 9 22:24:01 UTC 2012
---
pyanaconda/storage/partitioning.py | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index 7528ed3..ee3c997 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -1583,7 +1583,15 @@ class TotalSizeSet(object):
size has been achieved.
"""
def __init__(self, devices, size):
- self.devices = devices
+ self.devices = []
+ for device in devices:
+ if isinstance(device, LUKSDevice):
+ partition = device.slave
+ else:
+ partition = device
+
+ self.devices.append(partition)
+
self.size = size
self.requests = []
@@ -1608,7 +1616,15 @@ class TotalSizeSet(object):
class SameSizeSet(object):
""" Set of device requests with a common target size. """
def __init__(self, devices, size, grow=False, max_size=None):
- self.devices = devices
+ self.devices = []
+ for device in devices:
+ if isinstance(device, LUKSDevice):
+ partition = device.slave
+ else:
+ partition = device
+
+ self.devices.append(partition)
+
self.size = int(size / len(devices))
self.grow = grow
self.max_size = max_size
--
1.7.7.6
More information about the anaconda-patches
mailing list