[PATCH][master][rhel6-branch] Try to get boot reqs onto the selected boot device. (#560387)

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

 



Also, don't log huge disk strings when the names will suffice.
---
 storage/partitioning.py |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/storage/partitioning.py b/storage/partitioning.py
index 20d7694..4f81405 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -922,10 +922,21 @@ def allocatePartitions(storage, disks, partitions, freespace):
             # no disks specified means any disk will do
             req_disks = disks
 
+        # sort the disks, making sure the boot disk is first
         req_disks.sort(key=lambda d: d.name, cmp=storage.compareDisks)
+        boot_index = None
+        for disk in req_disks:
+            if disk.name == storage.anaconda.id.bootloader.drivelist[0]:
+                boot_index = req_disks.index(disk)
+
+        if boot_index is not None and len(req_disks) > 1:
+            boot_disk = req_disks.pop(boot_index)
+            req_disks.insert(0, boot_disk)
+
         log.debug("allocating partition: %s ; id: %d ; disks: %s ;\n"
                   "boot: %s ; primary: %s ; size: %dMB ; grow: %s ; "
-                  "max_size: %s" % (_part.name, _part.id, req_disks,
+                  "max_size: %s" % (_part.name, _part.id,
+                                    [d.name for d in req_disks],
                                     _part.req_bootable, _part.req_primary,
                                     _part.req_size, _part.req_grow,
                                     _part.req_max_size))
-- 
1.6.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