[WBEL-users] troubles with yum on ia32e machines (Xeon 64-bit)
Marcel Gsteiger
Marcel.Gsteiger@milprog.ch
Wed, 06 Oct 2004 11:20:33 +0200
Hi all
I just have installed a proliant ML370G4 (ia32e). After installing kernel-2.4.21-20.EL.ia32e.rpm, yum died with a IndexError: list index out of range message in clientStuff.py, function 'bestversion'.
Further analysis revealed that the problem comes from the fact that my kernel's arch is neither x86_64 nor i386. (i have to use the ia32e kernel to make the box run, the x86_64 kernel does not boot).
Obviously yum is unable to handle the case where there is a package installed for an architecture it does not know about.
I fixed the problem by testing for the case of an empty list before assigning currentarch, as follows:
clientStuff.py:
def bestversion(nevral, name):
"""this takes a nevral and a pkg name - it iterates through them to return
the list of archs having the highest version number - so if someone has
package foo.i386 and foo.i686 then we'll get a list of i386 and i686 returned
minimum of one thing returned"""
# first we get a list of the archs
# determine the best e-v-r
# then we determine the archs that have that version and append them to a list
returnarchs = []
archs = archwork.availablearchs(nevral, name)
# inserted the following line to check for unknown architectures oct 6, 2004 marcel.gsteiger@milprog.ch
if archs == []: return returnarchs
currentarch = archs[0]
(...continued)
archwork.py:
def bestarch(archlist):
# inserted the following line to check for unknown architectures oct 6, 2004 marcel.gsteiger@milprog.ch
if archlist == []: return None
currentarch = archlist[0]
for arch in archlist[1:]:
currentarch = betterarch(currentarch, arch)
return currentarch
After these two modifications, my yum works again (finally...)
Maybe there is an easier solution to this problem...
Regards
--Marcel