Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Red Hat Install (http://www.linux-archive.org/red-hat-install/)
-   -   Don't immediately retry on downloading a package. (http://www.linux-archive.org/red-hat-install/432826-dont-immediately-retry-downloading-package.html)

Chris Lumens 09-28-2010 02:37 PM

Don't immediately retry on downloading a package.
 
Resolves: rhbz#544323
---
yuminstall.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 31ef782..39e705d 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -17,6 +17,7 @@ import os.path
import shutil
import timer
import warnings
+import time
import types
import glob
import re
@@ -639,6 +640,14 @@ class AnacondaYum(YumSorter):
def urlgrabberFailureCB (self, obj, *args, **kwargs):
log.warning("Try %s/%s for %s failed" % (obj.tries, obj.retry, obj.url))

+ delay = 0.25*(2**(obj.tries-1))
+ if delay > 1:
+ w = self.anaconda.intf.waitWindow(_("Retrying"), _("Retrying package download..."))
+ time.sleep(delay)
+ w.pop()
+ else:
+ time.sleep(delay)
+
def getDownloadPkgs(self):
downloadpkgs = []
totalSize = 0
--
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

David Cantrell 09-28-2010 02:58 PM

Don't immediately retry on downloading a package.
 
Ack.

On Tue, 28 Sep 2010, Chris Lumens wrote:


Resolves: rhbz#544323
---
yuminstall.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 31ef782..39e705d 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -17,6 +17,7 @@ import os.path
import shutil
import timer
import warnings
+import time
import types
import glob
import re
@@ -639,6 +640,14 @@ class AnacondaYum(YumSorter):
def urlgrabberFailureCB (self, obj, *args, **kwargs):
log.warning("Try %s/%s for %s failed" % (obj.tries, obj.retry, obj.url))

+ delay = 0.25*(2**(obj.tries-1))
+ if delay > 1:
+ w = self.anaconda.intf.waitWindow(_("Retrying"), _("Retrying package download..."))
+ time.sleep(delay)
+ w.pop()
+ else:
+ time.sleep(delay)
+
def getDownloadPkgs(self):
downloadpkgs = []
totalSize = 0



--
David Cantrell <dcantrell@redhat.com>
Red Hat / Honolulu, HI

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 03:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.