Only include the swap request size in the case where we're about to tell them they can run autopart in the existing free space, since that's the main place it can be a surprise to find that you do not actually have space for the selected software.
For the bug referenced below we still need to redo the space check each time a new software selection is applied.
Related: rhbz#853636 --- pyanaconda/ui/gui/spokes/storage.py | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index b4fb1aa..0296242 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -663,10 +663,14 @@ class StorageSpoke(NormalSpoke, StorageChecker): fs_free = sum([f[1] for f in free_space.itervalues()])
required_space = self.payload.spaceRequired - log.debug("disk free: %s fs free: %s sw needs: %s" % (disk_free, - fs_free, - required_space)) - if disk_free >= required_space: + auto_swap = Size(bytes=0) + for autoreq in self.storage.autoPartitionRequests: + if autoreq.fstype == "swap": + auto_swap += Size(spec="%d MB" % autoreq.size) + + log.debug("disk free: %s fs free: %s sw needs: %s auto swap: %s" + % (disk_free, fs_free, required_space, auto_swap)) + if disk_free >= required_space + auto_swap: dialog = InstallOptions1Dialog(self.data) elif disks_size >= required_space: dialog = InstallOptions2Dialog(self.data, payload=self.payload)