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

James Antill james at osuosl.org
Sat Apr 4 15:02:29 UTC 2009


 yum/__init__.py        |    6 ++----
 yum/transactioninfo.py |    5 +----
 2 files changed, 3 insertions(+), 8 deletions(-)

New commits:
commit ef6f313d5f97aa7398ac3aa04c4637d8b9da7125
Author: James Antill <james at and.org>
Date:   Fri Apr 3 11:54:21 2009 -0400

    Don't try and install 20 kernel updates on RHEL

diff --git a/yum/__init__.py b/yum/__init__.py
index cdc22e8..08caa2a 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2773,8 +2773,7 @@ class YumBase(depsolve.Depsolve):
             #  Always look for available packages, it doesn't seem to do any
             # harm (apart from some time). And it fixes weird edge cases where
             # "update a" (which requires a new b) is different from "update b"
-            (e, m, u) = self.pkgSack.matchPackageNames([kwargs['pattern']])
-            availpkgs.extend(e)
+            m =self.pkgSack.returnNewestByNameArch(patterns=[kwargs['pattern']])
             availpkgs.extend(m)
 
             if not availpkgs and not instpkgs:
commit 91eeeb7b848b8c5ad16ef87a34d8d963e634a54c
Author: James Antill <james at and.org>
Date:   Fri Apr 3 11:33:55 2009 -0400

    Sort txmbrs the same way we sort package objects

diff --git a/yum/transactioninfo.py b/yum/transactioninfo.py
index 6f78ac5..f17e331 100644
--- a/yum/transactioninfo.py
+++ b/yum/transactioninfo.py
@@ -563,10 +563,7 @@ class TransactionMember:
             self.depends_on.append(po)
 
     def __cmp__(self, other):
-        result = cmp(self.name, other.name)
-        if not result:
-            return cmp(id(self), id(other))
-        return result
+        return cmp(self.po, other.po)
 
     def __hash__(self):
         return object.__hash__(self)
commit 2eb44cec388449f0f22f658ed8145c6b2d1334bc
Author: James Antill <james at and.org>
Date:   Thu Apr 2 12:37:15 2009 -0400

    Stop all the complaining about smallest first

diff --git a/yum/__init__.py b/yum/__init__.py
index 94fb2c6..cdc22e8 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1222,8 +1222,7 @@ class YumBase(depsolve.Depsolve):
             a = apo.getDiscNum()
             b = bpo.getDiscNum()
             if a is None and b is None:
-                # Download smallest pkgs first
-                return apo.size - bpo.size
+                return cmp(apo, bpo)
             if a is None:
                 return -1
             if b is None:


More information about the Yum-commits mailing list