Related: rhbz##1016673
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com --- pyanaconda/ui/gui/spokes/storage.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index bdfb3e3..f85c37b 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -51,12 +51,13 @@ from pyanaconda.ui.gui.spokes.lib.resize import ResizeDialog from pyanaconda.ui.gui.categories.system import SystemCategory from pyanaconda.ui.gui.utils import enlightbox
-from pyanaconda.kickstart import doKickstartStorage +from pyanaconda.kickstart import doKickstartStorage, getAvailableDiskSpace from blivet import empty_device from blivet.size import Size from blivet.devices import MultipathDevice from blivet.errors import StorageError from blivet.platform import platform +from blivet.devicelibs import swap as swap_lib from pyanaconda.threads import threadMgr, AnacondaThread from pyanaconda.product import productName from pyanaconda.flags import flags @@ -406,6 +407,16 @@ class StorageSpoke(NormalSpoke, StorageChecker): # user may have set up before now. self.storage.config.clearNonExistent = self.data.autopart.autopart
+ # refresh swap size suggestion with currently selected disks + swap_request = None + for request in self.storage.autoPartitionRequests: + if request.fstype == "swap": + swap_request = request + break + + disk_space = getAvailableDiskSpace(self.storage) + swap_request.size = swap_lib.swapSuggestion(disk_space=disk_space) + def execute(self): # Spawn storage execution as a separate thread so there's no big delay # going back from this spoke to the hub while StorageChecker.run runs.
From: Vratislav Podzimek vpodzime@redhat.com
Related: rhbz##1016673
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com --- pyanaconda/ui/gui/spokes/storage.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index bdfb3e3..43b1bf6 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -51,12 +51,13 @@ from pyanaconda.ui.gui.spokes.lib.resize import ResizeDialog from pyanaconda.ui.gui.categories.system import SystemCategory from pyanaconda.ui.gui.utils import enlightbox
-from pyanaconda.kickstart import doKickstartStorage +from pyanaconda.kickstart import doKickstartStorage, getAvailableDiskSpace from blivet import empty_device from blivet.size import Size from blivet.devices import MultipathDevice from blivet.errors import StorageError from blivet.platform import platform +from blivet.devicelibs import swap as swap_lib from pyanaconda.threads import threadMgr, AnacondaThread from pyanaconda.product import productName from pyanaconda.flags import flags @@ -406,6 +407,13 @@ class StorageSpoke(NormalSpoke, StorageChecker): # user may have set up before now. self.storage.config.clearNonExistent = self.data.autopart.autopart
+ # refresh the autopart swap size suggestion with currently selected disks + for request in self.storage.autoPartitionRequests: + if request.fstype == "swap": + disk_space = getAvailableDiskSpace(self.storage) + request.size = swap_lib.swapSuggestion(disk_space=disk_space) + break + def execute(self): # Spawn storage execution as a separate thread so there's no big delay # going back from this spoke to the hub while StorageChecker.run runs.
On Thu, Oct 10, 2013 at 08:13:47AM -0700, Brian C. Lane wrote:
From: Vratislav Podzimek vpodzime@redhat.com
Related: rhbz##1016673
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com
pyanaconda/ui/gui/spokes/storage.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
pushed
anaconda-patches@lists.fedorahosted.org