rpms/yum/F-9 0002--Fix-packagesNewestByName-to-use-comparePoEVR-as-p.patch, NONE, 1.1 0003-Make-sure-we-only-consider-the-newest-names-among-a.patch, NONE, 1.1 yum.spec, 1.215, 1.216
Jesse Keating (jkeating)
fedora-extras-commits at redhat.com
Tue Jun 24 21:33:31 UTC 2008
Author: jkeating
Update of /cvs/pkgs/rpms/yum/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1302
Modified Files:
yum.spec
Added Files:
0002--Fix-packagesNewestByName-to-use-comparePoEVR-as-p.patch
0003-Make-sure-we-only-consider-the-newest-names-among-a.patch
Log Message:
* Tue Jun 24 2008 Jesse Keating <jkeating at redhat.com> - 3.2.16-4
- Add a couple more upstream patches for even more multilib fixes
0002--Fix-packagesNewestByName-to-use-comparePoEVR-as-p.patch:
--- NEW FILE 0002--Fix-packagesNewestByName-to-use-comparePoEVR-as-p.patch ---
>From 40471d1d681f62415487def517ac90f253fafa9b Mon Sep 17 00:00:00 2001
From: James Antill <james at and.org>
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
0003-Make-sure-we-only-consider-the-newest-names-among-a.patch:
--- NEW FILE 0003-Make-sure-we-only-consider-the-newest-names-among-a.patch ---
>From 14d1fa3db112f7f93ee9b41b74085110e10b9f73 Mon Sep 17 00:00:00 2001
From: James Antill <james at and.org>
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
Index: yum.spec
===================================================================
RCS file: /cvs/pkgs/rpms/yum/F-9/yum.spec,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -r1.215 -r1.216
--- yum.spec 24 Jun 2008 17:11:35 -0000 1.215
+++ yum.spec 24 Jun 2008 21:32:42 -0000 1.216
@@ -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 @@
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 @@
%patch3 -p0
%patch4 -p1
%patch5 -p1
+%patch6 -p1
+%patch7 -p1
%build
make
@@ -107,6 +111,9 @@
%dir /usr/lib/yum-plugins
%changelog
+* Tue Jun 24 2008 Jesse Keating <jkeating at redhat.com> - 3.2.16-4
+- Add a couple more upstream patches for even more multilib fixes
+
* Tue Jun 24 2008 Jesse Keating <jkeating at redhat.com> - 3.2.16-3
- Add another patch from upstream for multilib policy and noarch
More information about the scm-commits
mailing list