[yum-commits] Branch 'yum-3_2_X' - 4 commits - yum/depsolve.py yum/__init__.py

skvidal at osuosl.org skvidal at osuosl.org
Mon Apr 6 15:21:29 UTC 2009


 yum/__init__.py |   16 ++++++++++++++--
 yum/depsolve.py |   15 ++++++---------
 2 files changed, 20 insertions(+), 11 deletions(-)

New commits:
commit 257d17f95743a679b62807dd4eb6d29c6b628f5c
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Apr 6 11:19:37 2009 -0400

    really apply the returnPackageByDep() patch

diff --git a/yum/__init__.py b/yum/__init__.py
index d112d24..8ce96ef 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -55,7 +55,7 @@ import transactioninfo
 import urlgrabber
 from urlgrabber.grabber import URLGrabber, URLGrabError
 from urlgrabber.progress import format_number
-from packageSack import packagesNewestByNameArch
+from packageSack import packagesNewestByNameArch, ListPackageSack
 import depsolve
 import plugins
 import logginglevels
@@ -2284,7 +2284,8 @@ class YumBase(depsolve.Depsolve):
         except Errors.YumBaseError:
             raise Errors.YumBaseError, _('No Package found for %s') % depstring
         
-        result = self._bestPackageFromList(pkglist)
+        ps = ListPackageSack(pkglist)
+        result = self._bestPackageFromList(ps.returnNewestByNameArch())
         if result is None:
             raise Errors.YumBaseError, _('No Package found for %s') % depstring
         
commit aab55654a01ee238af0e8c036308703da2079d38
Merge: 306a527... a511905...
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Apr 6 11:17:19 2009 -0400

    Merge branch 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum into yum-3_2_X
    
    * 'yum-3_2_X' of ssh://yum.baseurl.org/srv/projects/yum/git/yum:
      Remove repo setup progress that does nothing
      Make translations work again
      updated Danish translation by Kris
      fix indetation error, made when commiting ccca634fd6f5bbb11d90eb32ef1b34a27f6d2ed7
      updated Serbian translation by Milos Komarcevic
      updated Catalan translation by Xavier Conde
      Revert part of d0ed077f779050930cdcd09b2618966482a430bb.
      Only do yumdb_info lookups on installed pkgs, fix the column calcs.
      Don't try and install 20 kernel updates on RHEL
      Sort txmbrs the same way we sort package objects
      Stop all the complaining about smallest first

commit 306a527e44042212805f3c561caf2c5d686fe73f
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Apr 6 11:16:25 2009 -0400

    - make sure returnPackagesByDep() only looks at newest providers
    - stubs for the verifyTransaction() method - this is just a placeholder

diff --git a/yum/__init__.py b/yum/__init__.py
index 94fb2c6..844c111 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -974,8 +974,19 @@ class YumBase(depsolve.Depsolve):
 
         self.rpmdb.dropCachedData() # drop out the rpm cache so we don't step on bad hdr indexes
         self.plugins.run('posttrans')
+        # sync up what just happened versus what is in the rpmdb
+        self.verifyTransaction()
         return resultobject
 
+    def verifyTransaction(self):
+        """checks that the transaction did what we expected it to do. Also 
+           propagates our external yumdb info"""
+        
+        # check to see that the rpmdb and the tsInfo roughly matches
+        # push package object metadata outside of rpmdb into yumdb
+        # delete old yumdb metadata entries
+        pass
+        
     def costExcludePackages(self):
         """exclude packages if they have an identical package in another repo
         and their repo.cost value is the greater one"""
commit 568eaf5b88f376a1822396fd9dc7324d1aed23ea
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Mon Apr 6 11:15:56 2009 -0400

    do the obsoletes check in compare_providers() properly.

diff --git a/yum/depsolve.py b/yum/depsolve.py
index fdf48a3..48e3c65 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -1084,17 +1084,14 @@ class Depsolve(object):
                 if po == nextpo:
                     continue
                 obsoleted = False
-                for obs in nextpo.obsoletes:
-                    if po.inPrcoRange('provides', obs):
-                        obsoleted = True
+                poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release))
+                if nextpo.inPrcoRange('obsoletes', poprovtup):
+                    obsoleted = True
+                    pkgresults[po] -= 1024
                                 
-                        self.verbose_logger.log(logginglevels.DEBUG_4,
-                            _("%s obsoletes %s") % (po, nextpo))
+                    self.verbose_logger.log(logginglevels.DEBUG_4,
+                        _("%s obsoletes %s") % (nextpo, po))
 
-                    if obsoleted:
-                        pkgresults[po] -= 1024
-                        break
-                
                 if reqpo:
                     arches = (reqpo.arch, getBestArch())
                 else:


More information about the Yum-commits mailing list