[Yum-devel] [PATCH] No async downloading when --cacheonly. BZ 830523.
Zdeněk Pavlas
zpavlas at redhat.com
Mon Jun 11 08:49:17 UTC 2012
When --cacheonly, we raise RepoError instead of downloading.
Instead of duplicating the error handling in async path,
don't even try.
---
yum/repos.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
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)
--
1.7.4.4
More information about the Yum-devel
mailing list