[yum-commits] Branch 'yum-3_2_X' - yum/misc.py

skvidal at osuosl.org skvidal at osuosl.org
Mon Mar 9 18:53:20 UTC 2009


 yum/misc.py |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

New commits:
commit 53c43138ea7b6a71c04289adef957f1c2243fed8
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Mar 9 14:51:10 2009 -0400

    clean up some garbage from get_running_kernel_version_release

diff --git a/yum/misc.py b/yum/misc.py
index aaa5917..e0d3388 100644
--- a/yum/misc.py
+++ b/yum/misc.py
@@ -620,17 +620,9 @@ def get_running_kernel_version_release(ts):
     """This takes the output of uname and figures out the (version, release)
     tuple for the running kernel."""
     ver = os.uname()[2]
-    reduced = ver
-    # FIXME this should probably get passed this list from somewhere in config
-    # possibly from the kernelpkgnames option
-    for s in ("bigmem", "enterprise", "smp", "hugemem", "PAE", "rt",
-              "guest", "hypervisor", "xen0", "xenU", "xen", "debug",
-              "PAE-debug"):
-        if ver.endswith(s):
-            reduced = ver.replace(s, "")
-            
-    # we've got nothing so far, so... we glob for the file that MIGHT have
-    # this kernels and then look up the file in our rpmdb
+
+    # we glob for the file that MIGHT have this kernel
+    # and then look up the file in our rpmdb.
     fns = sorted(glob.glob('/boot/vmlinuz*%s*' % ver))
     for fn in fns:
         mi = ts.dbMatch('basenames', fn)


More information about the Yum-commits mailing list