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

James Antill james at osuosl.org
Thu Apr 30 03:29:09 UTC 2009


 yum/__init__.py |    9 +++++++--
 yum/yumRepo.py  |    2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 858c77edad7ef6a1505a5e2f085dba948ed81ffa
Author: James Antill <james at and.org>
Date:   Wed Apr 29 23:20:01 2009 -0400

    Turn off total download, when download is finished

diff --git a/yum/__init__.py b/yum/__init__.py
index fc7945a..0973203 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -1370,6 +1370,8 @@ class YumBase(depsolve.Depsolve):
                 if errors.has_key(po):
                     del errors[po]
 
+        if hasattr(urlgrabber.progress, 'text_meter_total_size'):
+            urlgrabber.progress.text_meter_total_size(0)
         if callback_total is not None and not errors:
             callback_total(remote_pkgs, remote_size, beg_download)
 
commit 5b0164cc3f337946568d0d1cc9f22640b95c3f9e
Author: James Antill <james at and.org>
Date:   Tue Apr 28 11:30:58 2009 -0400

    Don't show multiple obsoletes if multiple versions are available

diff --git a/yum/__init__.py b/yum/__init__.py
index ec4429e..fc7945a 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2863,8 +2863,11 @@ class YumBase(depsolve.Depsolve):
         # check for obsoletes first
         if self.conf.obsoletes:
             for installed_pkg in instpkgs:
-                for obsoleting in self.up.obsoleted_dict.get(installed_pkg.pkgtup, []):
-                    obsoleting_pkg = self.getPackageObject(obsoleting)
+                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]
+                for obsoleting_pkg in packagesNewestByNameArch(obs_pkgs):
                     tx_return.extend(self.install(po=obsoleting_pkg))
             for available_pkg in availpkgs:
                 for obsoleted in self.up.obsoleting_dict.get(available_pkg.pkgtup, []):
commit e027b4c6ea907ebbdfa6eb3e101f0a089ba016b4
Author: James Antill <james at and.org>
Date:   Mon Apr 27 10:33:15 2009 -0400

    Add comment about RepoMDError in retrieveMD

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 671de7d..401433f 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -1434,6 +1434,8 @@ class YumRepository(Repository, config.RepoConf):
 
     def _retrieveMD(self, mdtype, retrieve_can_fail=False):
         """ Internal function, use .retrieveMD() from outside yum. """
+        #  Note that this can raise Errors.RepoMDError if mdtype doesn't exist
+        # for this repo.
         thisdata = self.repoXML.getData(mdtype)
 
         (r_base, remote) = thisdata.location


More information about the Yum-commits mailing list