rpms/yum/devel yum-mutual-obsoletes-providers.patch, NONE, 1.1 yum.spec, 1.195, 1.196
Seth Vidal (skvidal)
fedora-extras-commits at redhat.com
Tue Mar 4 17:08:29 UTC 2008
Author: skvidal
Update of /cvs/extras/rpms/yum/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5491
Modified Files:
yum.spec
Added Files:
yum-mutual-obsoletes-providers.patch
Log Message:
mutual obsoleting providers doomage patch
yum-mutual-obsoletes-providers.patch:
--- NEW FILE yum-mutual-obsoletes-providers.patch ---
--- yum/depsolve.py~ 2008-03-03 13:22:32.000000000 -0500
+++ yum/depsolve.py 2008-03-04 11:57:03.000000000 -0500
@@ -938,59 +938,100 @@
return x.sourcerpm == y.sourcerpm
for po in pkgs:
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("Comparing best: %s to po: %s") %(bestpkg, po))
+
if po == bestpkg: # if we're comparing the same one, skip it
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("Same: best %s == po: %s") %(bestpkg, po))
+
continue
# if best is obsoleted by any of the packages, then the obsoleter
# is the new best
for obs in po.obsoletes:
if bestpkg.inPrcoRange('provides', obs):
+ # make sure the best doesn't obsolete this po - if it does we're done
+ # we do this b/c it is possible for two entries to oscillate in this
+ # test - obsolete should trump no matter what
+ # NOTE: mutually obsoleting providers is completely and utterly doom
+ # but this should 'break the loop'
+ for obs in bestpkg.obsoletes:
+ if po.inPrcoRange('provides', obs):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("best %s obsoletes po: %s") %(bestpkg, po))
+ return bestpkg
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("po %s obsoletes best: %s") %(po, bestpkg))
+
return po
- # make sure the best doesn't obsolete this po - if it does we're done
- # we do this b/c it is possible for two entries to oscillate in this
- # test - obsolete should trump no matter what
- # NOTE: mutually obsoleting providers is completely and utterly doom
+ # just check if best obsoletes po
for obs in bestpkg.obsoletes:
if po.inPrcoRange('provides', obs):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("best %s obsoletes po: %s") %(bestpkg, po))
return bestpkg
+
if reqpo.arch != 'noarch':
best_dist = archDifference(reqpo.arch, bestpkg.arch)
if isMultiLibArch(): # only go to the next one if we're multilib - i686 can satisfy i386 deps
if best_dist == 0: # can't really use best's arch anyway...
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("better arch in po %s") %(po))
return po # just try the next one - can't be much worse
po_dist = archDifference(reqpo.arch, po.arch)
if po_dist > 0 and best_dist > po_dist:
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("better arch in po %s") %(po))
+
return po
if best_dist == po_dist:
if (not _common_sourcerpm(reqpo, bestpkg) and
_common_sourcerpm(reqpo, po)):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("po %s shares a sourcerpm with %s") %(po, reqpo))
return po
+
cplp = _common_prefix_len(reqpo.name, po.name)
cplb = _common_prefix_len(reqpo.name, bestpkg.name)
if cplp > cplb:
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("po %s shares more of the name prefix with %s") %(po, reqpo))
return po
if cplp == cplb and len(po.name) < len(bestpkg.name):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("po %s has a shorter name than best %s") %(po, bestpkg))
return po
elif (not _common_sourcerpm(reqpo, bestpkg) and
_common_sourcerpm(reqpo, po)):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("po %s shares a sourcerpm with %s") %(po, reqpo))
return po
elif (_common_prefix_len(reqpo.name, po.name) >
_common_prefix_len(reqpo.name, bestpkg.name)):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("po %s shares more of the name prefix with %s") %(po, reqpo))
return po
elif (_common_prefix_len(reqpo.name, po.name) <
_common_prefix_len(reqpo.name, bestpkg.name)):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("bestpkg %s shares more of the name prefix with %s") %(bestpkg, reqpo))
return bestpkg
elif len(po.name) < len(bestpkg.name):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("po %s has a shorter name than best %s") %(po, bestpkg))
return po
elif len(po.name) == len(bestpkg.name):
# compare arch
arch = rpmUtils.arch.getBestArchFromList([po.arch, bestpkg.arch])
if arch == po.arch:
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _("better arch in po %s") %(po))
return po
# Nothing else was better, so this is it
Index: yum.spec
===================================================================
RCS file: /cvs/extras/rpms/yum/devel/yum.spec,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -r1.195 -r1.196
--- yum.spec 3 Mar 2008 19:22:19 -0000 1.195
+++ yum.spec 4 Mar 2008 17:07:23 -0000 1.196
@@ -3,13 +3,14 @@
Summary: RPM installer/updater
Name: yum
Version: 3.2.12
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Group: System Environment/Base
Source0: http://linux.duke.edu/projects/yum/download/3.2/%{name}-%{version}.tar.gz
Source1: yum.conf.fedora
Source2: yum-updatesd.conf.fedora
Patch0: installonlyn-enable.patch
+Patch1: yum-mutual-obsoletes-providers.patch
URL: http://linux.duke.edu/yum/
BuildArch: noarch
@@ -49,6 +50,7 @@
%prep
%setup -q
%patch0 -p0 -b .installonly
+%patch1 -p0
%build
make
@@ -97,6 +99,9 @@
%dir /usr/lib/yum-plugins
%changelog
+* Tue Mar 4 2008 Seth Vidal <skvidal at fedoraproject.org> 3.2.12-2
+- fix mutually obsoleting providers (like glibc!)
+
* Mon Mar 3 2008 Seth Vidal <skvidal at fedoraproject.org> - 3.2.12-1
- 3.2.12
More information about the fedora-extras-commits
mailing list