dpolovinkin / rpms / anaconda

Forked from rpms/anaconda 3 years ago
Clone

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

Karanbir Singh e0be2b
diff -uNr anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py
Karanbir Singh e0be2b
--- anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py	2015-10-29 14:23:19.000000000 +0000
Karanbir Singh e0be2b
+++ anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py	2015-12-07 17:36:49.070000000 +0000
Karanbir Singh e0be2b
@@ -481,12 +481,16 @@
f4150a
     @property
f4150a
     def mirrorEnabled(self):
f4150a
         with _yum_lock:
Karanbir Singh e0be2b
-            # yum initializes with plugins disabled, and when plugins are disabled
Karanbir Singh e0be2b
-            # _yum.plugins is a DummyYumPlugins object, which has no useful attributes.
Karanbir Singh e0be2b
-            if hasattr(self._yum.plugins, "_plugins"):
Karanbir Singh e0be2b
-                return "fastestmirror" in self._yum.plugins._plugins
Karanbir Singh e0be2b
+            # we just skip this on CentOS since we cant support it yet
f4150a
+            if productName.startswith("CentOS"):
Karanbir Singh e0be2b
+              return False
Karanbir Singh e0be2b
             else:
Karanbir Singh e0be2b
-                return False
Karanbir Singh e0be2b
+              # yum initializes with plugins disabled, and when plugins are disabled
Karanbir Singh e0be2b
+              # _yum.plugins is a DummyYumPlugins object, which has no useful attributes.
Karanbir Singh e0be2b
+              if hasattr(self._yum.plugins, "_plugins"):
Karanbir Singh e0be2b
+                  return "fastestmirror" in self._yum.plugins._plugins
Karanbir Singh e0be2b
+              else:
Karanbir Singh e0be2b
+                  return False
f4150a
 
f4150a
     def getRepo(self, repo_id):
f4150a
         """ Return the yum repo object. """
Karanbir Singh 36d77b
diff -uNr anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py
Karanbir Singh 36d77b
--- anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py	2015-12-07 21:29:36.058347960 +0000
Karanbir Singh 36d77b
+++ anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py	2015-12-07 21:32:50.255770594 +0000
Karanbir Singh 36d77b
@@ -43,6 +43,7 @@
Karanbir Singh 36d77b
 from pyanaconda.iutil import execReadlines
Karanbir Singh 36d77b
 from pyanaconda.simpleconfig import simple_replace
Karanbir Singh 36d77b
 from functools import wraps
Karanbir Singh 36d77b
+from pyanaconda.product import productName 
Karanbir Singh 36d77b
 
Karanbir Singh 36d77b
 import logging
Karanbir Singh 36d77b
 log = logging.getLogger("packaging")