[PATCH 2/2] cleardisk_gui: Fix going back to the cleardisks gui

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

 



1) When populating the store make left / right visible depend on if the
   disk is listed in clearPartDisks or not
2) Don't extend clearPartDisks when moving to the next screen, but set it
   so that drives which were moved to the left get removed from it.
3) The bootdisk is part of cleardisks, don't put it in
   clearPartDisks twice
4) Update the bootloader drivelist, putting the select drive on the front,
   don't override it. Even if we just want to mount a disk it should still
   count in our bios drive order, so that grub gets a correct map
   (Note even before this fix this was already effectively being done
    by bootloader.py which overrides the drivelist as set by clearpart_gui)

Note this patch only fixes back/forth issues with the UI code, there is
still a problem in the underlying logic code, where after having
autopartitioned once, subsequent attemps will fail with no free space found.
I've filed this as bug 559233.
---
 iw/cleardisks_gui.py |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/iw/cleardisks_gui.py b/iw/cleardisks_gui.py
index 10ffdcb..ec026ec 100644
--- a/iw/cleardisks_gui.py
+++ b/iw/cleardisks_gui.py
@@ -60,8 +60,8 @@ class ClearDisksWindow (InstallWindow):
 
         cleardisks.sort(self.anaconda.id.storage.compareDisks)
 
-        self.anaconda.id.storage.clearPartDisks.extend(cleardisks + [bootDisk])
-        self.anaconda.id.bootloader.drivelist = [bootDisk] + cleardisks
+        self.anaconda.id.storage.clearPartDisks = cleardisks
+        self.anaconda.id.bootloader.updateDriveList([bootDisk])
 
     def getScreen (self, anaconda):
         (xml, self.vbox) = gui.getGladeWidget("cleardisks.glade", "vbox")
@@ -140,7 +140,13 @@ class ClearDisksWindow (InstallWindow):
             if not device:
                 continue
 
-            self.store.append(None, (device, True, True, False, False,
+            rightVisible = d in self.anaconda.id.storage.clearPartDisks
+            rightActive = rightVisible and \
+                          d in self.anaconda.id.bootloader.drivelist[:1]
+            leftVisible = not rightVisible
+            self.store.append(None, (device,
+                                     leftVisible, True,
+                                     rightVisible, rightActive,
                                      device.model,
                                      str(int(device.size)) + " MB",
                                      device.vendor, "", device.serial))
-- 
1.6.5.2

_______________________________________________
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