[Yum-devel] [PATCH] add check to make sure rest in the libc collapsing is not a single item list.

Seth Vidal skvidal at fedoraproject.org
Tue Jun 21 18:05:13 UTC 2011


---
 yum/packages.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/yum/packages.py b/yum/packages.py
index d8043f9..5ef9951 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -1186,7 +1186,7 @@ class YumAvailablePackage(PackageObject, RpmBase):
             if libc_requires:
                 rest = sorted(libc_requires, cmp=compareVerOnly, key=itemgetter(0))
                 best = rest.pop()
-                if best[0].startswith('libc.so.6()'): # rpmvercmp will sort this one as 'highest' so we need to remove it from the list
+                if len(rest) > 0 and best[0].startswith('libc.so.6()'): # rpmvercmp will sort this one as 'highest' so we need to remove it from the list
                     best = rest.pop()
                 newlist = []
                 for i in mylist:
-- 
1.7.4.4



More information about the Yum-devel mailing list