[yum-commits] 2 commits - yum/repos.py

zpavlas at osuosl.org zpavlas at osuosl.org
Mon Jun 11 14:30:32 UTC 2012


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

New commits:
commit 84b05dfd81b127b52e8bad634661e610a3b4fb55
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date:   Mon Jun 11 10:36:45 2012 +0200

    No async downloading when --cacheonly.  BZ 830523.
    
    When --cacheonly, we raise RepoError instead of downloading.
    Instead of duplicating the error handling in async path,
    don't even try.

diff --git a/yum/repos.py b/yum/repos.py
index 30d520a..3cbbe25 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -78,6 +78,8 @@ class RepoStorage:
 
         repos = []
         for repo in self.listEnabled():
+            if repo.cache:
+                continue
             if repo._async and repo._commonLoadRepoXML(repo):
                 mdtypes = repo._mdpolicy2mdtypes()
                 downloading = repo._commonRetrieveDataMD_list(mdtypes)
@@ -326,6 +328,8 @@ class RepoStorage:
         if hasattr(urlgrabber.grabber, 'parallel_wait'):
             # download all metadata in parallel
             for repo in myrepos:
+                if repo.cache:
+                    continue
                 if repo._async:
                     sack = repo.getPackageSack()
                     sack._retrieve_async(repo, data)
commit 442cabc9da0a3fb541f07ece64a3d5648b975f61
Author: Zdeněk Pavlas <zpavlas at redhat.com>
Date:   Mon Jun 11 10:05:02 2012 +0200

    fix "inconsistent use of tabs and spaces"

diff --git a/yum/repos.py b/yum/repos.py
index 4b1d52e..30d520a 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -84,7 +84,7 @@ class RepoStorage:
                 repos.append((repo, downloading, [False]))
 
         # with sizes first, then without sizes..
-	for no_size in (False, True):
+        for no_size in (False, True):
             for repo, downloading, error in repos:
                 def failfunc(obj, error=error):
                     error[0] = True


More information about the Yum-commits mailing list