Blame SOURCES/BZ-1183669-corrupt-cache.patch

d2a170
commit fb107337b2490d314a4f31562427cdebe9eca4e4
d2a170
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
d2a170
Date:   Thu Mar 17 16:35:29 2016 +0100
d2a170
d2a170
    Disable repo with skip_if_unavailable=True if repomd.xml can't be retrieved.
d2a170
d2a170
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
d2a170
index fc5d538..3f7e975 100644
d2a170
--- a/yum/yumRepo.py
d2a170
+++ b/yum/yumRepo.py
d2a170
@@ -1460,6 +1460,10 @@ Insufficient space in download directory %s
d2a170
             else:
d2a170
                 result = self._getFileRepoXML(local, text)
d2a170
                 if result is None:
d2a170
+                    if self.skip_if_unavailable and self._metadata_cache_req in ('write', 'read-only:future'):
d2a170
+                        # Since skip_if_unavailable=True, we can just disable this repo
d2a170
+                        raise Errors.RepoError, "Can't download repomd.xml for %s" % self.ui_id
d2a170
+
d2a170
                     # Ignore this as we have a copy
d2a170
                     self._revertOldRepoXML()
d2a170
                     return False