1 |
jpp |
1.2 |
diff -uNrp anaconda-21.48.22.121.orig/pyanaconda/packaging/yumpayload.py anaconda-21.48.22.121/pyanaconda/packaging/yumpayload.py |
2 |
|
|
--- anaconda-21.48.22.121.orig/pyananconda/packaging/yumpayload.py 2017-08-31 16:28:06.672265889 +0000 |
3 |
|
|
+++ anaconda-21.48.22.121/pyanaconda/packaging/yumpayload.py 2017-08-31 16:28:38.812826778 +0000 |
4 |
|
|
@@ -42,6 +42,7 @@ import time |
5 |
|
|
import hashlib |
6 |
|
|
from pyanaconda.packaging import SSLOptions |
7 |
|
|
from pyanaconda.iutil import execReadlines, ipmi_abort |
8 |
|
|
+from pyanaconda.product import productName |
9 |
|
|
from pyanaconda.simpleconfig import simple_replace |
10 |
|
|
from functools import wraps |
11 |
|
|
from urlgrabber.grabber import URLGrabber, URLGrabError |
12 |
|
|
@@ -540,12 +541,16 @@ reposdir=%s |
13 |
unnilennium |
1.1 |
@property |
14 |
|
|
def mirrorEnabled(self): |
15 |
|
|
with _yum_lock: |
16 |
|
|
- # yum initializes with plugins disabled, and when plugins are disabled |
17 |
|
|
- # _yum.plugins is a DummyYumPlugins object, which has no useful attributes. |
18 |
|
|
- if hasattr(self._yum.plugins, "_plugins"): |
19 |
|
|
- return "fastestmirror" in self._yum.plugins._plugins |
20 |
|
|
+ # we just skip this on CentOS since we cant support it yet |
21 |
|
|
+ if productName.startswith("CentOS"): |
22 |
|
|
+ return False |
23 |
|
|
else: |
24 |
|
|
- return False |
25 |
|
|
+ # yum initializes with plugins disabled, and when plugins are disabled |
26 |
|
|
+ # _yum.plugins is a DummyYumPlugins object, which has no useful attributes. |
27 |
|
|
+ if hasattr(self._yum.plugins, "_plugins"): |
28 |
|
|
+ return "fastestmirror" in self._yum.plugins._plugins |
29 |
|
|
+ else: |
30 |
|
|
+ return False |
31 |
|
|
|
32 |
|
|
def getRepo(self, repo_id): |
33 |
jpp |
1.2 |
"""Return the yum repo object.""" |