[PATCH 2/4] Bootloader stage1_drive is more than a suggestion. (#738964)

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

 



Don't implicitly set it, and make sure it is honored when finding
potential stage1 devices.
---
 pyanaconda/bootloader.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 4ef8b32..55ee16e 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -207,7 +207,7 @@ class BootLoader(object):
         # the device the bootloader will be installed on
         self._stage1_device = None
 
-        # the "boot drive", meaning the drive we prefer stage1 be on
+        # the "boot drive", meaning the drive stage1 _will_ go on
         self.stage1_drive = None
 
         self._update_only = False
@@ -232,8 +232,12 @@ class BootLoader(object):
                 log.debug("using stage2 device as stage1")
                 self.stage1_device = self.stage2_device
             else:
+                devices = self.stage1_devices
+                if self.stage1_drive:
+                    devices = [d for d in devices if
+                                self.stage1_drive in d.disks]
                 try:
-                    self.stage1_device = self.stage1_devices[0]
+                    self.stage1_device = devices[0]
                 except IndexError:
                     pass
 
@@ -245,8 +249,6 @@ class BootLoader(object):
         log.debug("new bootloader stage1 device: %s" % getattr(device,
                                                                "name", None))
         self._stage1_device = device
-        if device:
-            self.stage1_drive = device.disks[0]
 
     # pylint: disable-msg=E0202
     @property
-- 
1.7.6

_______________________________________________
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