[PATCH] Handle not finding the upgrade root gracefully.

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

 



---
 upgrade.py |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/upgrade.py b/upgrade.py
index be701fb..6f6ddd0 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -241,6 +241,21 @@ def upgradeMountFilesystems(anaconda):
                   "systems listed in /etc/fstab.  Please fix this problem "
                   "and try to upgrade again.\n%s" % e))
 	    sys.exit(0)
+        except IndexError as e:
+            # The upgrade root is search earlier but we give the message here.
+            log.debug("No upgrade root was fond.")
+            rc = anaconda.intf.messageWindow(_("Upgrade root not found"),
+                    _("The root for the previously installed system was not "
+                      "found.  You can exit installer or backtrack to choose "
+                      "installation instead of upgrade."),
+                type="custom",
+                custom_buttons = [ _("_Back"),
+                                   _("_Exit installer") ],
+                custom_icon="question")
+            if rc == 0:
+                return DISPATCH_BACK
+            elif rc == 1:
+                sys.exit(0)
 
 	checkLinks = ( '/etc', '/var', '/var/lib', '/var/lib/rpm',
 		       '/boot', '/tmp', '/var/tmp', '/root',
-- 
1.6.0.6

_______________________________________________
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