[PATCH] On rpm unpack errors, display a fatal error message (#452724).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We could just display some sort of warning here, but this seems like a pretty
big error.  It could indicate media read errors or network problems getting in
the way, and either of those will likely lead to additional errors later on.
---
 yuminstall.py |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index addea4b..296af40 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -222,6 +222,19 @@ class AnacondaCallback:
             else:
                 self.initWindow.pulse()
 
+        elif what in (rpm.RPMCALLBACK_CPIO_ERROR,
+                      rpm.RPMCALLBACK_UNPACK_ERROR):
+            (hdr, rpmloc) = h
+
+            self.messageWindow(_("Error Installing Package"),
+                _("A fatal error occurred when installing the %s "
+                  "package.  This could indicate errors when reading "
+                  "the installation media.  Installation cannot "
+                  "continue.") % hdr['name'],
+                type="custom", custom_icon="error",
+                custom_buttons=[_("_Exit installer")])
+            sys.exit(1)
+
         if self.initWindow is None:
             self.progress.processEvents()
 
-- 
1.6.4

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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux