[Yum-devel] [PATCH] Don't fail when pre-caching filelists. BZ 769864.

Zdeněk Pavlas zpavlas at redhat.com
Thu Jan 12 14:17:29 UTC 2012


'yum makecache' calls repos.populateSack(md, cacheonly=1)
for various non-primary metadata.  If this fails, we should
disable that repo and not exit(1).

This partially reverts commit 0ff54c5ae558:

> make sure we're only skipping the exception if we are doing
> a primary or global setup

I believe this is not necessary.  When depsolver needs filelist,
it calls repo.populate() directly, so always gets the exception.
---
 yum/repos.py |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/yum/repos.py b/yum/repos.py
index 3793bad..53870f0 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -283,17 +283,12 @@ class RepoStorage:
                 repobj = self.getRepo(which)
                 myrepos.append(repobj)
 
-        if mdtype == 'all':
-            data = ['metadata', 'filelists', 'otherdata']
-        else:
-            data = [ mdtype ]
-         
         for repo in myrepos:
             sack = repo.getPackageSack()
             try:
                 sack.populate(repo, mdtype, callback, cacheonly)
             except Errors.RepoError, e:
-                if mdtype in ['all', 'metadata'] and repo.skip_if_unavailable:
+                if repo.skip_if_unavailable:
                     self.disableRepo(repo.id)
                 else:
                     raise
-- 
1.7.4.4



More information about the Yum-devel mailing list