[PATCH 1/2] Show cleardisks gui always to allow selecting a boot disk. (#744088)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is not ideal but for F16 it accomplishes the goal of forcing
boot device selection while only using existing screens in existing
order. For custom, all disks are initially on the right and the
add/remove buttons are disabled.
---
 pyanaconda/iw/autopart_type.py  |    5 +----
 pyanaconda/iw/cleardisks_gui.py |   12 ++++++++++--
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/iw/autopart_type.py b/pyanaconda/iw/autopart_type.py
index 87907b8..536adcc 100644
--- a/pyanaconda/iw/autopart_type.py
+++ b/pyanaconda/iw/autopart_type.py
@@ -153,13 +153,10 @@ class PartitionTypeWindow(InstallWindow):
 
         if self.buttonGroup.getCurrent() == "custom":
             self.dispatch.skip_steps("autopartitionexecute")
-            self.dispatch.skip_steps("cleardiskssel")
+            self.dispatch.request_steps_gently("cleardiskssel")
             self.dispatch.request_steps("partition")
             self.dispatch.request_steps_gently("bootloader")
-
-            # re-scan all devices. this is handled in cleardisks_gui if autopart
             self.storage.config.clearPartType = CLEARPART_TYPE_NONE
-            self.storage.reset()
         else:
             if self.buttonGroup.getCurrent() == "shrink":
                 # we need to store this information so that it can survive
diff --git a/pyanaconda/iw/cleardisks_gui.py b/pyanaconda/iw/cleardisks_gui.py
index 5ce6aee..4713173 100644
--- a/pyanaconda/iw/cleardisks_gui.py
+++ b/pyanaconda/iw/cleardisks_gui.py
@@ -64,7 +64,8 @@ class ClearDisksWindow (InstallWindow):
         """ Save clearPartDisks and reset storage, preserving stage1_drive. """
         # Re-scan the devices. We only come here for autopart, so the clearpart
         # type should be set appropriately already.
-        self.anaconda.storage.config.clearPartDisks = clear
+        if self.anaconda.storage.doAutoPart:
+            self.anaconda.storage.config.clearPartDisks = clear
         self.anaconda.storage.reset()
         boot_disk = self.anaconda.storage.devicetree.getDeviceByName(boot)
         self.anaconda.bootloader.stage1_drive = boot_disk
@@ -158,12 +159,19 @@ class ClearDisksWindow (InstallWindow):
                                 "name",
                                 self.anaconda.bootloader.drives[0].name)
 
+        if self.anaconda.storage.doAutoPart:
+            use_disks = self.anaconda.storage.config.clearPartDisks
+        else:
+            use_disks = [d.name for d in disks]
+            self.addButton.set_sensitive(False)
+            self.removeButton.set_sensitive(False)
+
         # The device filtering UI set up exclusiveDisks as a list of the names
         # of all the disks we should use later on.  Now we need to go get those,
         # look up some more information in the devicetree, and set up the
         # selector.
         for d in disks:
-            rightVisible = d.name in self.anaconda.storage.config.clearPartDisks
+            rightVisible = d.name in use_disks
             rightActive = rightVisible and d.name == self.bootDisk
             leftVisible = not rightVisible
 
-- 
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux