dpolovinkin / rpms / anaconda

Forked from rpms/anaconda 3 years ago
Clone

Blame SOURCES/anaconda-centos-skip-retry-if-not-connected.patch

ee9cff
diff -uNr anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py
ee9cff
--- anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py       2015-12-08 14:36:52.533000000 +0000
ee9cff
+++ anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py     2015-12-08 14:38:51.464000000 +0000
ee9cff
@@ -648,6 +648,10 @@
ee9cff
                     # so that unattended installations on unreliable networks have
ee9cff
                     # a higher chance of finishing successfully
ee9cff
                     xdelay = xprogressive_delay()
ee9cff
+                    if not nm_is_connected():
ee9cff
+                      MAX_METADATA_DOWNLOAD_RETRIES = 1
ee9cff
+                    else:
ee9cff
+                      MAX_METADATA_DOWNLOAD_RETRIES = 10
ee9cff
                     for retry_count in xrange(0, MAX_METADATA_DOWNLOAD_RETRIES + 1):
ee9cff
                         if retry_count > 0:
ee9cff
                             # introduce a retry delay