[master 28/30] Fix the rescue kernel version list in writeBootLoader (#1201429)

KosiehBarter installerbot-noreply at redhat.com
Thu Jul 16 12:00:52 UTC 2015


From: David Shea <dshea at redhat.com>

The list is supposed to contain versions, not full paths.

(cherry picked from commit 1a7a1cc62f8035eef7d54922ce2f2df3b3f7f640)
---
 pyanaconda/bootloader.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 074bbca..51cd8cf 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -2395,8 +2395,10 @@ def writeBootLoader(storage, payload, instClass, ksdata):
     # get a list of installed kernel packages
     # add whatever rescue kernels we can find to the end
     kernel_versions = list(payload.kernelVersionList)
-    kernel_versions += glob(iutil.getSysroot() + "/boot/vmlinuz-*-rescue-*")
-    kernel_versions += glob(iutil.getSysroot() + "/boot/efi/EFI/%s/vmlinuz-*-rescue-*" % instClass.efi_dir)
+
+    rescue_versions = glob(iutil.getSysroot() + "/boot/vmlinuz-*-rescue-*")
+    rescue_versions += glob(iutil.getSysroot() + "/boot/efi/EFI/%s/vmlinuz-*-rescue-*" % instClass.efi_dir)
+    kernel_versions += (f.split("/")[-1][8:] for f in rescue_versions)
 
     if not kernel_versions:
         log.warning("no kernel was installed -- boot loader config unchanged")


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/d184835373af08fe9a5530be998aa4327d85aee9


More information about the anaconda-patches mailing list