From 911b5fc7da6f05f4f9462b97084ace5c2a90db80 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Jun 24 2008 21:32:42 +0000 Subject: - Add a couple more upstream patches for even more multilib fixes --- diff --git a/0002--Fix-packagesNewestByName-to-use-comparePoEVR-as-p.patch b/0002--Fix-packagesNewestByName-to-use-comparePoEVR-as-p.patch new file mode 100644 index 0000000..a9407bc --- /dev/null +++ b/0002--Fix-packagesNewestByName-to-use-comparePoEVR-as-p.patch @@ -0,0 +1,45 @@ +From 40471d1d681f62415487def517ac90f253fafa9b Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Tue, 24 Jun 2008 17:21:26 -0400 +Subject: [PATCH] Fix packagesNewestByName() to use comparePoEVR as pkg.__cmp__ uses .arch info. + thus we'd only get one pkg from the alph sorted arch. + kind of a weird interface, not quite the "same" as packageNewestByNameArch() + +--- + yum/packageSack.py | 12 ++++++++---- + 1 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/yum/packageSack.py b/yum/packageSack.py +index 53cfced..8bc36f8 100644 +--- a/yum/packageSack.py ++++ b/yum/packageSack.py +@@ -23,6 +23,7 @@ import warnings + import re + import fnmatch + import misc ++import packages + + class PackageSackBase(object): + """Base class that provides the interface for PackageSacks.""" +@@ -838,11 +839,14 @@ def packagesNewestByName(pkgs): + newest = {} + for pkg in pkgs: + key = pkg.name +- if key not in newest or pkg > newest[key][0]: ++ ++ # Can't use pkg.__cmp__ because it takes .arch into account ++ cval = 1 ++ if key in newest: ++ cval = packages.comparePoEVR(pkg, newest[key][0]) ++ if cval > 0: + newest[key] = [pkg] +- elif pkg < newest[key][0]: +- continue +- else: ++ elif cval == 0: + newest[key].append(pkg) + ret = [] + for vals in newest.itervalues(): +-- +1.5.5.2 + diff --git a/0003-Make-sure-we-only-consider-the-newest-names-among-a.patch b/0003-Make-sure-we-only-consider-the-newest-names-among-a.patch new file mode 100644 index 0000000..02d47b9 --- /dev/null +++ b/0003-Make-sure-we-only-consider-the-newest-names-among-a.patch @@ -0,0 +1,55 @@ +From 14d1fa3db112f7f93ee9b41b74085110e10b9f73 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Tue, 24 Jun 2008 17:23:54 -0400 +Subject: [PATCH] Make sure we only consider the newest names, among all the arch varients + +--- + yum/__init__.py | 25 +++++++++++++++++++------ + 1 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/yum/__init__.py b/yum/__init__.py +index bbf3df8..bcdab95 100644 +--- a/yum/__init__.py ++++ b/yum/__init__.py +@@ -53,7 +53,7 @@ from parser import ConfigPreProcessor + import transactioninfo + import urlgrabber + from urlgrabber.grabber import URLGrabError +-from packageSack import packagesNewestByNameArch ++from packageSack import packagesNewestByNameArch, packagesNewestByName + import depsolve + import plugins + import logginglevels +@@ -2034,11 +2034,24 @@ class YumBase(depsolve.Depsolve): + + if len(pkglist) == 1: + return pkglist[0] +- +- bestlist = packagesNewestByNameArch(pkglist) +- +- best = bestlist[0] +- for pkg in bestlist[1:]: ++ ++ bestlist = packagesNewestByNameArch(pkglist) ++ # Here we need the list of the latest version of each package ++ # the problem we are trying to fix is: ABC-1.2.i386 and ABC-1.3.noarch ++ # so in the above we need to "exclude" ABC < 1.3, which is done by ++ # making another list from newest by name and then make sure any pkg is ++ # in nbestlist. ++ nbestlist = packagesNewestByName(bestlist) ++ ++ best = nbestlist[0] ++ nbestlist = set(nbestlist) ++ for pkg in bestlist: ++ if pkg == best: ++ continue ++ if pkg not in nbestlist: ++ continue ++ ++ # This is basically _compare_providers() ... but without a reqpo + if len(pkg.name) < len(best.name): # shortest name silliness + best = pkg + continue +-- +1.5.5.2 + diff --git a/yum.spec b/yum.spec index 9a6158f..609e65d 100644 --- a/yum.spec +++ b/yum.spec @@ -3,7 +3,7 @@ Summary: RPM installer/updater Name: yum Version: 3.2.16 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://linux.duke.edu/projects/yum/download/3.2/%{name}-%{version}.tar.gz @@ -15,6 +15,8 @@ Patch2: yum-manpage-files.patch Patch3: yum-multilib-policy-best.patch Patch4: 0001-gotta-check-both-not-either-otherwise-filedeps-do.patch Patch5: 0001-Allow-noarch-packages-when-in-multilib_policy-best.patch +Patch6: 0002--Fix-packagesNewestByName-to-use-comparePoEVR-as-p.patch +Patch7: 0003-Make-sure-we-only-consider-the-newest-names-among-a.patch URL: http://linux.duke.edu/yum/ BuildArch: noarch @@ -59,6 +61,8 @@ can notify you when they are available via email, syslog or dbus. %patch3 -p0 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build make @@ -107,6 +111,9 @@ rm -rf $RPM_BUILD_ROOT %dir /usr/lib/yum-plugins %changelog +* Tue Jun 24 2008 Jesse Keating - 3.2.16-4 +- Add a couple more upstream patches for even more multilib fixes + * Tue Jun 24 2008 Jesse Keating - 3.2.16-3 - Add another patch from upstream for multilib policy and noarch