[PATCH 1/3] Prevent any changes in the StorageSpoke if just going back

Vratislav Podzimek vpodzime at redhat.com
Fri Jun 26 09:39:05 UTC 2015


If user deselects all disks it means they just want to go back from the disk
selection screen. If that's the case, we shouldn't do any changes to storage
configuration.

Related: rhbz#1160862
Related: rhbz#1187644

(port of the commit 0c9a8bc1192c320bc1461687e88f4275eff4b213 from f22-branch)

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

diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 64d1aed..eabc96d 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -716,6 +716,14 @@ class StorageSpoke(NormalSpoke, StorageChecker):
         # user might want to change settings presented in the dialogs shown from
         # within this method.
 
+        disks = [d for d in self.disks if d.name in self.selected_disks]
+        disks_size = sum((d.size for d in disks), Size(0))
+
+        # No disks selected?  The user wants to back out of the storage spoke.
+        if not disks:
+            NormalSpoke.on_back_clicked(self, button)
+            return
+
         # Remove all non-existing devices if autopart was active when we last
         # refreshed.
         if self._previous_autopart:
@@ -735,15 +743,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
                  disk not in self.storage.devices:
                 self.storage.devicetree.unhide(disk)
 
-        # show the installation options dialog
-        disks = [d for d in self.disks if d.name in self.selected_disks]
-        disks_size = sum((d.size for d in disks), Size(0))
-
-        # No disks selected?  The user wants to back out of the storage spoke.
-        if not disks:
-            NormalSpoke.on_back_clicked(self, button)
-            return
-
         if arch.isS390():
             # check for unformatted DASDs and launch dasdfmt if any discovered
             dasds = make_unformatted_dasd_list(self.selected_disks)
-- 
2.1.0



More information about the anaconda-patches mailing list