neil / rpms / anaconda

Forked from rpms/anaconda a year ago
Clone
fbcaed
From 84f32dc53aeaf5ec3f6b2b2f2c480daa97e3b69a Mon Sep 17 00:00:00 2001
fbcaed
From: "Brian C. Lane" <bcl@redhat.com>
fbcaed
Date: Tue, 29 Apr 2014 16:39:33 -0700
fbcaed
Subject: [PATCH 19/20] Skip source and software spoke in text live
fbcaed
 installations (#1092763)
fbcaed
fbcaed
text liveimg kickstart installations were failing because it was trying
fbcaed
to show the software and source spokes. This copies the showable logic
fbcaed
over from the GUI spokes and skips them for live and liveimg kickstart
fbcaed
installations.
fbcaed
fbcaed
Resolves: rhbz#1092763
fbcaed
---
fbcaed
 pyanaconda/ui/tui/hubs/__init__.py   | 4 ++--
fbcaed
 pyanaconda/ui/tui/spokes/software.py | 4 ++++
fbcaed
 pyanaconda/ui/tui/spokes/source.py   | 4 ++++
fbcaed
 3 files changed, 10 insertions(+), 2 deletions(-)
fbcaed
fbcaed
diff --git a/pyanaconda/ui/tui/hubs/__init__.py b/pyanaconda/ui/tui/hubs/__init__.py
fbcaed
index b637f94..55a67d8 100644
fbcaed
--- a/pyanaconda/ui/tui/hubs/__init__.py
fbcaed
+++ b/pyanaconda/ui/tui/hubs/__init__.py
fbcaed
@@ -61,13 +61,13 @@ class TUIHub(TUIObject, common.Hub):
fbcaed
                     continue
fbcaed
 
fbcaed
                 spoke = s(self.app, self.data, self.storage, self.payload, self.instclass)
fbcaed
-                spoke.initialize()
fbcaed
 
fbcaed
                 if not spoke.showable:
fbcaed
-                    spoke.teardown()
fbcaed
                     del spoke
fbcaed
                     continue
fbcaed
 
fbcaed
+                spoke.initialize()
fbcaed
+
fbcaed
                 if spoke.indirect:
fbcaed
                     continue
fbcaed
 
fbcaed
diff --git a/pyanaconda/ui/tui/spokes/software.py b/pyanaconda/ui/tui/spokes/software.py
fbcaed
index dc337e1..44f3da3 100644
fbcaed
--- a/pyanaconda/ui/tui/spokes/software.py
fbcaed
+++ b/pyanaconda/ui/tui/spokes/software.py
fbcaed
@@ -72,6 +72,10 @@ class SoftwareSpoke(NormalTUISpoke):
fbcaed
         self._ready = True
fbcaed
 
fbcaed
     @property
fbcaed
+    def showable(self):
fbcaed
+        return not flags.livecdInstall and not self.data.method.method == "liveimg"
fbcaed
+
fbcaed
+    @property
fbcaed
     def status(self):
fbcaed
         """ Where we are in the process """
fbcaed
         if self.errors:
fbcaed
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
fbcaed
index 3afe01b..fc889c6 100644
fbcaed
--- a/pyanaconda/ui/tui/spokes/source.py
fbcaed
+++ b/pyanaconda/ui/tui/spokes/source.py
fbcaed
@@ -203,6 +203,10 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
fbcaed
             return _("Nothing selected")
fbcaed
 
fbcaed
     @property
fbcaed
+    def showable(self):
fbcaed
+        return not flags.livecdInstall and not self.data.method.method == "liveimg"
fbcaed
+
fbcaed
+    @property
fbcaed
     def status(self):
fbcaed
         if self.errors:
fbcaed
             return _("Error setting up software source")
fbcaed
-- 
fbcaed
1.9.3
fbcaed