[PATCH 1/2] Explicitly request all free space when no size given in custom. (#872833)

David Lehman dlehman at redhat.com
Mon Nov 12 21:16:43 UTC 2012


The logic for handling it implicitly only works for partitions.
---
 pyanaconda/ui/gui/spokes/custom.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 29206d3..7edfdd0 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1561,7 +1561,13 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         mountpoint = dialog.mountpoint
         log.debug("requested size = %s  ; available space = %s"
                     % (dialog.size, self._free_space))
-        size = dialog.size
+
+        # if no size was entered, request as much of the free space as possible
+        if dialog.size.convertTo(spec="mb") < 1:
+            size = self._free_space
+        else:
+            size = dialog.size
+
         fstype = self.storage.getFSType(mountpoint)
         encrypted = self.data.autopart.encrypted
 
-- 
1.7.7.6



More information about the anaconda-patches mailing list