summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2007-08-13 19:31:59 +0000
committerJeremy Katz <katzj@redhat.com>2007-08-13 19:31:59 +0000
commit008d022cfef483d618e4994ec577f29fa5390459 (patch)
tree442753be29a0009e6e696332ba6fd00cc1d4ba53
parent8c622f2a5f62bc9654c58d3e5c69c29aa79cfcf7 (diff)
downloadanaconda-008d022cfef483d618e4994ec577f29fa5390459.tar.gz
anaconda-008d022cfef483d618e4994ec577f29fa5390459.tar.xz
anaconda-008d022cfef483d618e4994ec577f29fa5390459.zip
2007-08-13 Jeremy Katz <katzj@redhat.com>
* yuminstall.py (AnacondaYum._handleFailure): Don't use a method specific string that's 99% the same. Instead, just make the string work for everything. * installmethod.py (InstallMethod.badPackageError): Remove * image.py (badPackageError): Likewise. * urlinstall.py (badPackageError): Likewise.
-rw-r--r--ChangeLog7
-rw-r--r--image.py23
-rw-r--r--installmethod.py6
-rw-r--r--urlinstall.py8
-rw-r--r--yuminstall.py7
5 files changed, 13 insertions, 38 deletions
diff --git a/ChangeLog b/ChangeLog
index d978c7181..27ab1c83d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2007-08-13 Jeremy Katz <katzj@redhat.com>
+ * yuminstall.py (AnacondaYum._handleFailure): Don't use a method
+ specific string that's 99% the same. Instead, just make the
+ string work for everything.
+ * installmethod.py (InstallMethod.badPackageError): Remove
+ * image.py (badPackageError): Likewise.
+ * urlinstall.py (badPackageError): Likewise.
+
* yuminstall.py (AnacondaCallback): Remove without using the
installmethod's unlinkFilename.
(AnacondaCallback) No longer takes method arg
diff --git a/image.py b/image.py
index 8a2620a6f..1eaff4212 100644
--- a/image.py
+++ b/image.py
@@ -139,14 +139,6 @@ class CdromInstallMethod(ImageInstallMethod):
def ejectCD(self):
isys.ejectCdrom(self.device, makeDevice=1)
- def badPackageError(self, pkgname):
- return _("The file %s cannot be opened. This is due to a missing "
- "file or perhaps a corrupt package. Please verify your "
- "installation images and that you have all the required "
- "media.\n\n"
- "If you exit, your system will be left in an inconsistent "
- "state that will likely require reinstallation.\n\n") % pkgname
-
def systemUnmounted(self):
if self.loopbackFile:
isys.lochangefd("/dev/loop0",
@@ -364,13 +356,6 @@ class CdromInstallMethod(ImageInstallMethod):
class NfsInstallMethod(ImageInstallMethod):
- def badPackageError(self, pkgname):
- return _("The file %s cannot be opened. This is due to a missing "
- "file or perhaps a corrupt package. Please verify your "
- "installation tree contains all required packages.\n\n"
- "If you exit, your system will be left in an inconsistent "
- "state that will likely require reinstallation.\n\n") % pkgname
-
def __init__(self, method, rootPath, intf):
"""@param method: nfs:/mnt/source"""
tree = method[5:]
@@ -475,14 +460,6 @@ class NfsIsoInstallMethod(NfsInstallMethod):
self.umountImage()
self.mountImage(mediano)
- def badPackageError(self, pkgname):
- return _("The file %s cannot be opened. This is due to a missing "
- "file or perhaps a corrupt package. Please verify your "
- "installation images and that you have all the required "
- "media.\n\n"
- "If you exit, your system will be left in an inconsistent "
- "state that will likely require reinstallation.\n\n") % pkgname
-
def umountImage(self):
if self.currentMedia:
isys.umount(self.mntPoint)
diff --git a/installmethod.py b/installmethod.py
index 599a2a0f2..e8155e6b9 100644
--- a/installmethod.py
+++ b/installmethod.py
@@ -107,12 +107,6 @@ class InstallMethod:
def ejectCD(self):
pass
- ## Construct a method-specific error message.
- # @param pkgname The name of the package that could not be fetched.
- # @return A method-specific error message.
- def badPackageError(self, pkgname):
- pass
-
## Switch CDs.
# @param mediano The CD media number to switch to.
# @param filename The file to be read that requires switching media.
diff --git a/urlinstall.py b/urlinstall.py
index 078ec4269..f8d68fa7a 100644
--- a/urlinstall.py
+++ b/urlinstall.py
@@ -72,14 +72,6 @@ def urlretrieve(location, file, callback=None):
class UrlInstallMethod(InstallMethod):
- def badPackageError(self, pkgname):
- return _("The file %s cannot be opened. This is due to a missing "
- "file or perhaps a corrupt package. Please verify your "
- "mirror contains all required packages, and try using a "
- "different one.\n\n"
- "If you exit, your system will be left in an inconsistent "
- "state that will likely require reinstallation.\n\n") % pkgname
-
def systemUnmounted(self):
if self.loopbackFile:
isys.lochangefd("/dev/loop0",
diff --git a/yuminstall.py b/yuminstall.py
index e1342d2ff..5c639f453 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -456,7 +456,12 @@ class AnacondaYum(YumSorter):
def _handleFailure(self, package):
pkgFile = os.path.basename(package.returnSimple('relativepath'))
rc = self.anaconda.intf.messageWindow(_("Error"),
- self.method.badPackageError(pkgFile),
+ _("The file %s cannot be opened. This is due to a missing "
+ "file, a corrupt package or corrupt media. Please "
+ "verify your installation source.\n\n"
+ "If you exit, your system will be left in an inconsistent "
+ "state that will likely require reinstallation.\n\n") %
+ (pkgFile,),
type="custom", custom_icon="error",
custom_buttons=[_("Re_boot"), _("_Retry")])