[master/f21-branch] Ask users for enough space right at the first time (#876916)

Vratislav Podzimek vpodzime at redhat.com
Mon Aug 4 08:29:26 UTC 2014


If autopartitioning is not yet done because we are just about to ask user for
allocating enough space for us, we cannot determine the size of swap by summing
up the auto swap requests. Ask user for enough space for a swap we would like to
create if we had enough space instead.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/spokes/storage.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 479537b..1bf44f2 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -785,6 +785,10 @@ class StorageSpoke(NormalSpoke, StorageChecker):
         required_space = self.payload.spaceRequired
         auto_swap = sum((r.size for r in self.storage.autoPartitionRequests
                                 if r.fstype == "swap"), Size(0))
+        if self.autopart and auto_swap == Size(0):
+            # autopartitioning requested, but not applied yet (=> no auto swap
+            # requests), ask user for enough space to fit in the suggested swap
+            auto_swap = swap_lib.swapSuggestion()
 
         log.debug("disk free: %s  fs free: %s  sw needs: %s  auto swap: %s",
                   disk_free, fs_free, required_space, auto_swap)
-- 
1.9.3



More information about the anaconda-patches mailing list