[Yum] minor bug + correction

javier at rediris.es javier at rediris.es
Tue Jan 20 17:25:28 UTC 2004


Hello, I've found a minor bug on yum, in function getupdatedhdrlist at the
clientStuff module. It only appears for packages with multiple archs, and
I have seen it on `yum list` (probably info and similar commans also), but
it does not interfere with actual install/updating of packages.

In my case, I have installed glibc for i686, and I get (using repos at DUKE)

# yum -d 0 list glibc
glibc                               i386   2.3.2-27.9.7             updates    

 
glibc                               i686   2.3.2-27.9.7             db         


That means that I get listed a glibc-i386 which does not update anything, 
and/or
that I don't get listed a glibc-i686 package which also lives in the 'updates'
repository.
When multiple architectures exists at the repository with the same version 
that the installed one, only the different archs get listed (a kernel-i386 
shows at updates
repo the i586, i686 and athlon packages)

I have solved it in two steps (the two first patches).
The first patch makes that all the archs living at the repository get listed. 
In my case, I get listed glibc-i386 and glibc-i686
The second one ensures that versions equals to the installed one does not get 
listed even for complexupdated packages. In my case, I get no glibc at updates 
repo.

The third patch is intended to make simpler the code, but it assumes that for
the nevral which comes from rpm database it also happens that
evr(name) == evr(name,arch)
for any existing arch of the package. Although this is quite sensible and 
should
be true, it could produce unexpected results if I've been able to install for 
example glibc-i386-2.3.2 and glibc-i686-1.2.2 at the same time.
In this sense, the third patch makes the code less robust, and I'm not sure if
to incorporate it is actually a good idea. In any case, I sent it also.


							Javi



-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-complexupdate3.patch
Type: application/x-patch
Size: 1725 bytes
Desc: yum-complexupdate3.patch
Url : http://lists.baseurl.org/pipermail/yum/attachments/20040120/a319cea2/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-complexupdate2.patch
Type: application/x-patch
Size: 816 bytes
Desc: yum-complexupdate2.patch
Url : http://lists.baseurl.org/pipermail/yum/attachments/20040120/a319cea2/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-complexupdate.patch
Type: application/x-patch
Size: 1532 bytes
Desc: yum-complexupdate.patch
Url : http://lists.baseurl.org/pipermail/yum/attachments/20040120/a319cea2/attachment-0005.bin 


More information about the Yum mailing list