This addresses rhbz1036349 and rhbz1100504
In order to create the rescue kernel/initramfs, kernelVersionList
is referenced creating and populating _kernelVersionList with
rescueKernelList null since the rescue kernel has not been created yet.
The solution is to always rescan /boot/vmlinuz-* if rescueKernelList
is called. This is not really costly since it is only used once.
Note: Invalidating the cache when the recue kernel is created would
involve a lot more code which, of course, is also more potential for
bugs.
---
pyanaconda/packaging/__init__.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 725319b..31a4b9b 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -372,9 +372,8 @@ class Payload(object):
@property
def rescueKernelList(self):
- if not self._kernelVersionList:
- self._updateKernelVersionList()
-
+ # do re-scan if looking for rescue kernel
+ self._updateKernelVersionList()
return self._kernelVersionList[1]
##
--
1.9.3