[PATCH 6/7] Always run through the full storage spoke. (#960732)
David Lehman
dlehman at redhat.com
Wed May 15 18:39:44 UTC 2013
Some of the options are only presented in the dialogs that get shown
when leaving the storage spoke. We can't skip those without locking
users into the choices they made the first time through.
---
pyanaconda/ui/gui/spokes/storage.py | 24 +++---------------------
1 file changed, 3 insertions(+), 21 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 3082130..501d9b1 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -334,8 +334,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.clearPartType = CLEARPART_TYPE_NONE
self._previous_autopart = False
- self._initial_selected_disks = []
- self._initial_bootloader_disk = None
self._last_clicked_overview = None
self._cur_clicked_overview = None
@@ -412,15 +410,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
hubQ.send_ready(self.__class__.__name__, True)
@property
- def changed(self):
- disksChanged = set(self._initial_selected_disks) != set(self.selected_disks)
- bootloaderChanged = not bool(self.data.bootloader.bootDrive) or \
- self._initial_bootloader_disk != self.data.bootloader.bootDrive
- autopartChanged = self.autopart != self.data.autopart.autopart
-
- return disksChanged or bootloaderChanged or autopartChanged
-
- @property
def completed(self):
retval = (threadMgr.get(constants.THREAD_EXECUTE_STORAGE) is None and
threadMgr.get(constants.THREAD_CHECK_STORAGE) is None and
@@ -573,12 +562,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self._update_summary()
- # This list is used to determine if anything has changed in storage
- # configuration since the user entered the spoke. If not, we shouldn't
- # do anything when Done is clicked.
- self._initial_selected_disks = self.selected_disks[:]
- self._initial_bootloader_disk = self.data.bootloader.bootDrive
-
if self.errors:
self.set_warning(_("Error checking storage configuration. Click for details."))
elif self.warnings:
@@ -766,10 +749,9 @@ class StorageSpoke(NormalSpoke, StorageChecker):
return True
def on_back_clicked(self, button):
- # Did the user change anything? If not, this method is a no-op.
- if not self.changed and self.autopart:
- NormalSpoke.on_back_clicked(self, button)
- return
+ # We can't exit early if it looks like nothing has changed because the
+ # user might want to change settings presented in the dialogs shown from
+ # within this method.
# Remove all non-existing devices if autopart was active when we last
# refreshed.
--
1.8.1.4
More information about the anaconda-patches
mailing list