diff options
author | Chris Lumens <clumens@redhat.com> | 2012-11-14 14:04:46 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2012-11-14 16:09:34 -0500 |
commit | 6fa891ab982c8bc85b018431e38c99e5424f7ad8 (patch) | |
tree | 1f6106f2bc43323b103c9ba6155b6f678e3f4401 /pyanaconda/errors.py | |
parent | 838808becb08cf0cda1766b4ad5d8f6cd046b98e (diff) | |
download | anaconda-6fa891ab982c8bc85b018431e38c99e5424f7ad8.tar.gz anaconda-6fa891ab982c8bc85b018431e38c99e5424f7ad8.tar.xz anaconda-6fa891ab982c8bc85b018431e38c99e5424f7ad8.zip |
Handle package dependency errors on kickstart installs too (#865073).
This is not handled by similar code in the software spoke, because that code
is never run for kickstart installs containing a %packages section.
Diffstat (limited to 'pyanaconda/errors.py')
-rw-r--r-- | pyanaconda/errors.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py index 17e75a0fd..3ae917878 100644 --- a/pyanaconda/errors.py +++ b/pyanaconda/errors.py @@ -227,6 +227,14 @@ class ErrorHandler(object): self.ui.showError(message) return ERROR_RAISE + def _dependencyErrorHandler(self, *args, **kwargs): + message = _("The following software marked for installation has errors. " + "This is likely caused by an error with\nyour installation source.") + details = "\n".join(sorted(kwargs["exception"].message)) + + self.ui.showDetailedError(message, details) + return ERROR_RAISE + def cb(self, exn, *args, **kwargs): """This method is the callback that all error handling should pass through. The return value is one of the ERROR_* constants defined @@ -259,7 +267,8 @@ class ErrorHandler(object): "NoSuchGroup": self._noSuchGroupHandler, "NoSuchPackage": self._noSuchPackageHandler, "ScriptError": self._scriptErrorHandler, - "PayloadInstallError": self._payloadInstallHandler} + "PayloadInstallError": self._payloadInstallHandler, + "DependencyError": self._dependencyErrorHandler} if exn.__class__.__name__ in _map: kwargs["exception"] = exn |