Re: [PATCH] Check for not having found any disks after populating the tree (#583906)

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ack.  I like this one for rhel6-branch too, but don't forget to clone the BZ
to a RHEL-6 bug and reference that in the commit msg for rhel6-branch.

On Wed, 21 Apr 2010, Hans de Goede wrote:

It is possible for us to not find any disks post the filter ui,
this can happen in 3 ways:
1. kickstart install (no filter ui, ignoreDisks)
2. text install (no filter ui)
3. gui install disk(s) selected in filter ui have no recognizable format
  and user clicked ignore

When this happens we currently backtrace in the clearpart ui as that
expects there to be atleast one disk. As there is very little we can
do without atleast one disk check for this condition in storageInitialize()
and allow the user to go back or exit the install. In the cmdline kickstart
install case this will result in the no disks found message being printed
and the installation stopping (it will trigger the cannot have a question in
cmdline mode code).
---
storage/__init__.py |   10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 724ec88..85ee6cf 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -114,6 +114,16 @@ def storageInitialize(anaconda):
    else:
        storage.reset()

+    if not storage.disks:
+        rc = anaconda.intf.messageWindow(_("No disks found"),
+                _("No usable disks have been found."),
+                type="custom",
+                custom_buttons = [_("Back"), _("_Exit installer")],
+                default=0)
+        if rc == 0:
+            return DISPATCH_BACK
+        sys.exit(1)
+
# dispatch.py helper function
def storageComplete(anaconda):
    if anaconda.dir == DISPATCH_BACK:


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvQwfEACgkQ5hsjjIy1Vkm3IgCgsRyYsB7ztofiPCcT+jQzwtJ4
l8AAoO3IDEl/dx7wdCdZ20G1tPvMIAdS
=HMvN
-----END PGP SIGNATURE-----

_______________________________________________
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