[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Avoid getting linux-base in the kernel list
- From: Jeremy Katz <katzj redhat com>
- To: anaconda-devel-list redhat com
- Subject: [PATCH] Avoid getting linux-base in the kernel list
- Date: Thu, 6 Nov 2008 14:05:11 -0500
Sometimes, rpm returns the same kernel as being installed more than once due
to it having been in the transaction more than once (#467822). Let's make
sure that if that happens, we don't make the silliness continue
---
packages.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/packages.py b/packages.py
index 1e1214c..371e10e 100644
--- a/packages.py
+++ b/packages.py
@@ -298,6 +298,10 @@ def rpmKernelVersionList(rootPath = "/"):
if v == "" or tag == "":
log.warning("Unable to determine kernel type/version for %s-%s-%s.%s" %(h['name'], h['version'], h['release'], h['arch']))
continue
+ # rpm really shouldn't return the same kernel more than once... but
+ # sometimes it does (#467822)
+ if (v, h['arch'], tag) in versions:
+ continue
versions.append( (v, h['arch'], tag) )
return versions
--
1.6.0.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]