Commit 1fae76eb authored by Tim Lauridisen's avatar Tim Lauridisen

fixed some deprecation warnings using the '--oldkernels' option.

Use searchNevra() insted of returnTuplebyKeyword()
parent 820d0a0e
......@@ -170,8 +170,8 @@ def listOrphans(my):
def getKernels(my):
"""return a list of all installed kernels, sorted newest to oldest"""
kernlist = []
for tup in my.rpmdb.returnTupleByKeyword(name='kernel'):
for po in my.rpmdb.searchNevra(name='kernel'):
return kernlist
......@@ -180,9 +180,10 @@ def getKernels(my):
# are no longer installed or to kernel version that are in the removelist
def getOldKernelDevel(my,kernels,removelist):
devellist = []
for tup in my.rpmdb.returnTupleByKeyword(name='kernel-devel'):
for po in my.rpmdb.searchNevra(name='kernel-devel'):
# For all kernel-devel packages see if there is a matching kernel
# in kernels but not in removelist
tup = po.pkgtup
keep = False
for kernel in kernels:
if kernel in removelist:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment