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

James Antill james at osuosl.org
Mon May 17 18:45:27 UTC 2010


 yum/__init__.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit ce411009f3e80fa4b331db72e635b3f1d770bce9
Author: James Antill <james at and.org>
Date:   Sat May 15 20:16:01 2010 -0400

    Handle obsoleting pkgs. which are excluded after obsoleted_dict setup

diff --git a/yum/__init__.py b/yum/__init__.py
index 9546aec..612b6ab 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3389,7 +3389,12 @@ class YumBase(depsolve.Depsolve):
                 obs_tups = self.up.obsoleted_dict.get(installed_pkg.pkgtup, [])
                 # This is done so we don't have to returnObsoletes(newest=True)
                 # It's a minor UI problem for RHEL, but might as well dtrt.
-                obs_pkgs = [self.getPackageObject(tup) for tup in obs_tups]
+                obs_pkgs = []
+                for pkgtup in obs_tups:
+                    opkgs = self.pkgSack.searchPkgTuple(pkgtup)
+                    if not opkgs: #  Could have been be excluded after
+                        continue  # obsoleted_dict was setup.
+                    obs_pkgs.append(opkgs[0])
                 for obsoleting_pkg in packagesNewestByName(obs_pkgs):
                     tx_return.extend(self.install(po=obsoleting_pkg))
             for available_pkg in availpkgs:


More information about the Yum-commits mailing list