[anaconda:rhel7/master] Always have a "New ..." page even if it has no devices (#1043763)

mulhern amulhern at redhat.com
Thu Feb 20 13:18:15 UTC 2014


Resolves: rhbz#1043763

There should always be a page for the "New ..." Fedora or RHEL7 install
because that's our target, i.e., what we're trying to install with this
installer.

Several methods assume that a search in the accordion for the page that
corresponds to self.translated_new_install_name will always be successful
and will crash if none is found.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 pyanaconda/ui/gui/spokes/custom.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 61506fc..f72cae9 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -974,11 +974,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
 
         # Add in all the existing (or autopart-created) operating systems.
         for root in ui_roots:
-            # Don't make a page if none of the root's devices are left.
-            # Also, only include devices in an old page if the format is intact.
-            if not [d for d in root.swaps + root.mounts.values()
-                        if d in self._devices and d.disks and
-                           (root.name == self.translated_new_install_name or d.format.exists)]:
+            # Omit a page for the root if the root has no devices
+            #  * unless it is new_root
+            if not (root.name == self.translated_new_install_name or \
+               [d for d in root.swaps + root.mounts.values()
+                  if d in self._devices and d.disks and d.format.exists]):
                 continue
 
             page = Page(root.name)
-- 
1.8.3.1



More information about the anaconda-patches mailing list