devel/yum depsolve-fixes.patch,NONE,1.1 yum.spec,1.171,1.172

Jeremy Katz (katzj) fedora-extras-commits at redhat.com
Tue Aug 28 13:46:08 UTC 2007


Author: katzj

Update of /cvs/pkgs/devel/yum
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15530

Modified Files:
	yum.spec 
Added Files:
	depsolve-fixes.patch 
Log Message:
* Tue Aug 28 2007 Jeremy Katz <katzj at redhat.com> - 3.2.3-3
- fix some depsolving cases


depsolve-fixes.patch:

--- NEW FILE depsolve-fixes.patch ---
diff --git a/yum/depsolve.py b/yum/depsolve.py
index e5d55b7..57933cb 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -407,7 +407,8 @@ class Depsolve(object):
         (needname, needflags, needversion) = requirement
         checkdeps = 0
         missingdep = 0
-        
+        upgraded = {}
+
         #~ - if it's not available from some repository:
         #~     - mark as unresolveable.
         #
@@ -442,7 +443,7 @@ class Depsolve(object):
             # installed or in the ts, and this isn't a package that allows multiple installs
             # then if it's newer, fine - continue on, if not, then we're unresolveable
             # cite it and exit
-        
+
             tspkgs = []
             if not self.allowedMultipleInstalls(pkg):
                 # from ts
@@ -453,6 +454,8 @@ class Depsolve(object):
                         self.verbose_logger.log(logginglevels.DEBUG_2, msg)
                         provSack.delPackage(pkg)
                         continue
+                    elif tspkg.po.EVR < pkg.EVR:
+                        upgraded.setdefault(pkg.pkgtup, []).append(tspkg.pkgtup)
                 
                 # from rpmdb
                 dbpkgs = self.rpmdb.searchNevra(name=pkg.name, arch=pkg.arch)
@@ -552,6 +555,12 @@ class Depsolve(object):
             txmbr = self.tsInfo.addInstall(best)
             txmbr.setAsDep()
 
+            # if we had other packages with this name.arch that we found
+            # before, they're not going to be installed anymore, so we
+            # should mark them to be re-checked
+            if upgraded.has_key(best.pkgtup):
+                map(lambda x: self.tsInfo.remove(x), upgraded[best.pkgtup])
+
         checkdeps = 1
         
         return checkdeps, missingdep
@@ -759,7 +768,9 @@ class Depsolve(object):
         CheckDeps = False
         CheckInstalls = False
         CheckRemoves = False
-        for txmbr in self.tsInfo.getMembers() + self.tsInfo.getRemovedMembers():
+        # we need to check the opposite of install and remove for regular
+        # tsInfo members vs removed members
+        for (txmbr, inst, rem) in map(lambda x: (x, TS_INSTALL_STATES, TS_REMOVE_STATES), self.tsInfo.getMembers()) + map(lambda x: (x, TS_REMOVE_STATES, TS_INSTALL_STATES), self.tsInfo.getRemovedMembers()):
             if (self._dcobj.already_seen_removed.has_key(txmbr) or
                 (txmbr.ts_state is not None and self._dcobj.already_seen.has_key(txmbr))):
                 continue
@@ -769,10 +780,10 @@ class Depsolve(object):
             self.verbose_logger.log(logginglevels.DEBUG_2,
                                     "Checking deps for %s" %(txmbr,))
 
-            if txmbr.output_state in TS_INSTALL_STATES:
+            if txmbr.output_state in inst:
                 thisneeds = self._checkInstall(txmbr)
                 CheckInstalls = True
-            elif txmbr.output_state in TS_REMOVE_STATES:
+            elif txmbr.output_state in rem:
                 thisneeds = self._checkRemove(txmbr)
                 CheckRemoves = True
 


Index: yum.spec
===================================================================
RCS file: /cvs/pkgs/devel/yum/yum.spec,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- yum.spec	23 Aug 2007 12:49:46 -0000	1.171
+++ yum.spec	28 Aug 2007 13:45:32 -0000	1.172
@@ -3,7 +3,7 @@
 Summary: RPM installer/updater
 Name: yum
 Version: 3.2.3
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source0: http://linux.duke.edu/projects/yum/download/3.2/%{name}-%{version}.tar.gz
@@ -11,6 +11,7 @@
 Source2: yum-updatesd.conf.fedora
 Patch0: installonlyn-enable.patch
 Patch1: cli-ouput-fix.patch
+Patch2: depsolve-fixes.patch
 
 URL: http://linux.duke.edu/yum/
 BuildArch: noarch
@@ -47,6 +48,7 @@
 %setup -q
 %patch0 -p0 -b .installonly
 %patch1 -p1 -b .cli-output
+%patch2 -p1 -b .deps
 
 %build
 make
@@ -92,6 +94,9 @@
 %dir /usr/lib/yum-plugins
 
 %changelog
+* Tue Aug 28 2007 Jeremy Katz <katzj at redhat.com> - 3.2.3-3
+- fix some depsolving cases
+
 * Thu Aug 23 2007 Seth Vidal <skvidal at fedoraproject.org> 3.2.3-2
 - add patch to fix bug when yum is redirected to a pipe/file
 




More information about the fedora-extras-commits mailing list