Re: [PATCH] Do not offer going back when ugrade root for ks upgrade is not found (#499321)

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

 



Hi,

Looks reasonable to me.

Regards,

Hans


On 07/30/2009 12:15 PM, Radek Vykydal wrote:
Going back results in traceback which seems not right. Bug 499321 (preupgrade
backtrace) has lots of tracebacks with various causes of upgrade root not found
- I distincted two groups.:  1) dmraid not detected in f10 (=>  installation on
2 disks) while detected in f11 (=>  root not found). 2) root considered as
non-upgradable (/etc/redhat-release changed by user). Such a broad bug is
rather difficult to handle. OTOH we wouldn't get the tracebacks so easy if we
just ended with error message (as with the patch).
---
  upgrade.py |   28 ++++++++++++++++++----------
  1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/upgrade.py b/upgrade.py
index c94cc3a..48edff0 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -188,18 +188,26 @@ def upgradeMountFilesystems(anaconda):
          except IndexError as e:
              # The upgrade root is search earlier but we give the message here.
              log.debug("No upgrade root was found.")
-            rc = anaconda.intf.messageWindow(_("Upgrade root not found"),
+            if anaconda.isKickstart and anaconda.id.ksdata.upgrade.upgrade:
+                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:
+                      "found."), type="custom",
+                    custom_icon="info",
+                    custom_buttons=[_("Exit installer")])
                  sys.exit(0)
+            else:
+                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',

_______________________________________________
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