[Yum] yum update problem (for real this time) [PATCH]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Using 'exactarch=1' made multi-arch upgrades almost work for me, but there
is one remaining problem that I think is a bug.

in clientStuff.py, when performing a "complex update", yum does:

	for name in complexupdate:
	    hdrarchs = bestversion(headernevral, name)
	    rpmarchs = bestversion(rpmnevral, name)


and then it attempts to update only those packages in the 'rpmarchs' list.
In the typical x86_64 case, you might have two different glibc packages
installed:

	glibc-xxxxx-1.i686
	glibc-xxxxx-1.x86_64


Since both are at the same version, bestversion() will return the list
(x86_64, i686). Then yum will upgrade both packages simultaneously.

However, suppose that you have two differently versioned packages
installed:

	glibc-xxxxx-1.i686
	glibc-xxxxx-2.x86_64


Now bestversion() will only return x86_64, and yum will refuse to update
the i686 package.


I believe the correct behavior here would be to attempt to upgrade all
currently installed packages (for all architectures), ignoring the version
information. This is fine since yum will check later on whether or not an
update is needed for each individual package/arch combination.

The below patch against yum-2.0.7 fixes the problem for me. You can also
download the patch from:

	http://www-personal.engin.umich.edu/~wingc/patches/yum-2.0.7-multiarch.patch


Thanks,

Chris Wing
wingc@xxxxxxxxxxxxxxx




diff -uNr yum-2.0.7.orig/clientStuff.py yum-2.0.7/clientStuff.py
--- yum-2.0.7.orig/clientStuff.py	2004-05-07 00:58:34.000000000 -0400
+++ yum-2.0.7/clientStuff.py	2004-12-03 11:35:55.000000000 -0500
@@ -444,7 +444,7 @@
     # complex cases
     for name in complexupdate:
         hdrarchs = bestversion(headernevral, name)
-        rpmarchs = bestversion(rpmnevral, name)
+        rpmarchs = archwork.availablearchs(rpmnevral, name)
         hdr_best_arch = archwork.bestarch(hdrarchs)
         log(5, 'Best ver+arch avail for %s is %s' % (name, hdr_best_arch))
         rpm_best_arch = archwork.bestarch(rpmarchs)

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux