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
--- dispatch.py | 3 +++ text.py | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dispatch.py b/dispatch.py index 8c86677..e330b35 100644 --- a/dispatch.py +++ b/dispatch.py @@ -119,6 +119,9 @@ installSteps = [ class Dispatcher:
def gotoPrev(self): + """ + You should make sure canGoBack() returns True before attempting gotoPrev(). + """ self._setDir(DISPATCH_BACK) self.moveStep()
diff --git a/text.py b/text.py index 40093c6..76abc4c 100644 --- a/text.py +++ b/text.py @@ -715,14 +715,15 @@ class InstallInterface:
lastrc = rc
- if step == -1: - if not anaconda.dispatch.canGoBack(): + if step == -1: + if anaconda.dispatch.canGoBack(): + anaconda.dispatch.gotoPrev() + else: ButtonChoiceWindow(self.screen, _("Cancelled"), _("I can't go to the previous step " "from here. You will have to try " "again."), buttons=[_("OK")]) - anaconda.dispatch.gotoPrev() else: anaconda.dispatch.gotoNext()
Ack.
On Tue, 28 Sep 2010, Chris Lumens wrote:
dispatch.py | 3 +++ text.py | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dispatch.py b/dispatch.py index 8c86677..e330b35 100644 --- a/dispatch.py +++ b/dispatch.py @@ -119,6 +119,9 @@ installSteps = [ class Dispatcher:
def gotoPrev(self):
"""You should make sure canGoBack() returns True before attempting gotoPrev(). self.moveStep()""" self._setDir(DISPATCH_BACK)diff --git a/text.py b/text.py index 40093c6..76abc4c 100644 --- a/text.py +++ b/text.py @@ -715,14 +715,15 @@ class InstallInterface:
lastrc = rc
if step == -1:if not anaconda.dispatch.canGoBack():
if step == -1:if anaconda.dispatch.canGoBack():anaconda.dispatch.gotoPrev()else: ButtonChoiceWindow(self.screen, _("Cancelled"), _("I can't go to the previous step " "from here. You will have to try " "again."), buttons=[_("OK")])
else: anaconda.dispatch.gotoNext()anaconda.dispatch.gotoPrev()
We don't get a lot of information to go on from rpm/yum so just do the best we can. On interactive installs, complain that there was an error and redirect the user to install.log where the error will have been logged. On kickstart installs, just log the complaint. --- yuminstall.py | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/yuminstall.py b/yuminstall.py index 39e705d..efd3ab8 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -718,7 +718,7 @@ class AnacondaYum(YumSorter): spaceneeded = {}
try: - self.runTransaction(cb=cb) + rc = self.runTransaction(cb=cb) except YumBaseError, probs: # FIXME: we need to actually look at these problems... probTypes = { rpm.RPMPROB_NEW_FILE_CONFLICT : _('file conflicts'), @@ -767,6 +767,16 @@ class AnacondaYum(YumSorter): type="custom", custom_icon="error", custom_buttons=[_("Re_boot")]) sys.exit(1) + else: + if rc.return_code == 1: + msg = _("An error occurred while installing packages. Please " + "examine /root/install.log on your installed system for " + "detailed information.") + log.error(msg) + + if not self.anaconda.isKickstart: + intf.messageWindow(_("Error running transaction"), + msg, type="warning")
def doMacros(self): for (key, val) in self.macros.items():
Ack.
On Tue, 28 Sep 2010, Chris Lumens wrote:
We don't get a lot of information to go on from rpm/yum so just do the best we can. On interactive installs, complain that there was an error and redirect the user to install.log where the error will have been logged. On kickstart installs, just log the complaint.
yuminstall.py | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/yuminstall.py b/yuminstall.py index 39e705d..efd3ab8 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -718,7 +718,7 @@ class AnacondaYum(YumSorter): spaceneeded = {}
try:
self.runTransaction(cb=cb)
rc = self.runTransaction(cb=cb) except YumBaseError, probs: # FIXME: we need to actually look at these problems... probTypes = { rpm.RPMPROB_NEW_FILE_CONFLICT : _('file conflicts'),@@ -767,6 +767,16 @@ class AnacondaYum(YumSorter): type="custom", custom_icon="error", custom_buttons=[_("Re_boot")]) sys.exit(1)
else:if rc.return_code == 1:msg = _("An error occurred while installing packages. Please ""examine /root/install.log on your installed system for ""detailed information.")log.error(msg)if not self.anaconda.isKickstart:intf.messageWindow(_("Error running transaction"),msg, type="warning")def doMacros(self): for (key, val) in self.macros.items():
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
anaconda-devel@lists.fedoraproject.org