[PATCH] Ignore rescue kernels (#958906)
Brian C. Lane
bcl at redhat.com
Thu May 23 20:58:01 UTC 2013
From: "Brian C. Lane" <bcl at redhat.com>
---
pyanaconda/packaging/__init__.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 27de538..6376076 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -374,7 +374,9 @@ class Payload(object):
files = glob.glob(ROOT_PATH + "/boot/vmlinuz-*")
files.extend(glob.glob(ROOT_PATH + "/boot/efi/EFI/redhat/vmlinuz-*"))
# strip off everything up to and including vmlinuz- to get versions
- versions = [f.split("/")[-1][8:] for f in files if os.path.isfile(f)]
+ # Ignore rescue kernels
+ versions = [f.split("/")[-1][8:] for f in files if os.path.isfile(f) \
+ and f.find("-rescue-") == -1]
versions.sort(cmp=cmpfunc)
log.debug("kernel versions: %s" % versions)
self._kernelVersionList = versions
--
1.8.1.4
More information about the anaconda-patches
mailing list