dpolovinkin / rpms / anaconda

Forked from rpms/anaconda 3 years ago
Clone

Blame SOURCES/anaconda-centos-disable-mirrors.patch

3ce16c
diff -uNrp anaconda-21.48.22.121.orig/pyanaconda/packaging/yumpayload.py anaconda-21.48.22.121/pyanaconda/packaging/yumpayload.py
3ce16c
--- anaconda-21.48.22.121.orig/pyanaconda/packaging/yumpayload.py	2017-08-23 02:04:02.304040176 +0000
3ce16c
+++ anaconda-21.48.22.121/pyanaconda/packaging/yumpayload.py	2017-08-23 02:12:02.749029047 +0000
3ce16c
@@ -518,12 +518,16 @@ reposdir=%s
2f8f4e
     @property
2f8f4e
     def mirrorEnabled(self):
2f8f4e
         with _yum_lock:
3ce16c
-            # yum initializes with plugins disabled, and when plugins are disabled
3ce16c
-            # _yum.plugins is a DummyYumPlugins object, which has no useful attributes.
3ce16c
-            if hasattr(self._yum.plugins, "_plugins"):
3ce16c
-                return "fastestmirror" in self._yum.plugins._plugins
3ce16c
+            # we just skip this on CentOS since we cant support it yet
2f8f4e
+            if productName.startswith("CentOS"):
3ce16c
+              return False
3ce16c
             else:
3ce16c
-                return False
3ce16c
+              # yum initializes with plugins disabled, and when plugins are disabled
3ce16c
+              # _yum.plugins is a DummyYumPlugins object, which has no useful attributes.
3ce16c
+              if hasattr(self._yum.plugins, "_plugins"):
3ce16c
+                  return "fastestmirror" in self._yum.plugins._plugins
3ce16c
+              else:
3ce16c
+                  return False
2f8f4e
 
2f8f4e
     def getRepo(self, repo_id):
3ce16c
         """Return the yum repo object."""