netgod / rpms / anaconda

Forked from rpms/anaconda 2 years ago
Clone
Blob Blame History Raw
From 84f32dc53aeaf5ec3f6b2b2f2c480daa97e3b69a Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Tue, 29 Apr 2014 16:39:33 -0700
Subject: [PATCH 19/20] Skip source and software spoke in text live
 installations (#1092763)

text liveimg kickstart installations were failing because it was trying
to show the software and source spokes. This copies the showable logic
over from the GUI spokes and skips them for live and liveimg kickstart
installations.

Resolves: rhbz#1092763
---
 pyanaconda/ui/tui/hubs/__init__.py   | 4 ++--
 pyanaconda/ui/tui/spokes/software.py | 4 ++++
 pyanaconda/ui/tui/spokes/source.py   | 4 ++++
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/tui/hubs/__init__.py b/pyanaconda/ui/tui/hubs/__init__.py
index b637f94..55a67d8 100644
--- a/pyanaconda/ui/tui/hubs/__init__.py
+++ b/pyanaconda/ui/tui/hubs/__init__.py
@@ -61,13 +61,13 @@ class TUIHub(TUIObject, common.Hub):
                     continue
 
                 spoke = s(self.app, self.data, self.storage, self.payload, self.instclass)
-                spoke.initialize()
 
                 if not spoke.showable:
-                    spoke.teardown()
                     del spoke
                     continue
 
+                spoke.initialize()
+
                 if spoke.indirect:
                     continue
 
diff --git a/pyanaconda/ui/tui/spokes/software.py b/pyanaconda/ui/tui/spokes/software.py
index dc337e1..44f3da3 100644
--- a/pyanaconda/ui/tui/spokes/software.py
+++ b/pyanaconda/ui/tui/spokes/software.py
@@ -72,6 +72,10 @@ class SoftwareSpoke(NormalTUISpoke):
         self._ready = True
 
     @property
+    def showable(self):
+        return not flags.livecdInstall and not self.data.method.method == "liveimg"
+
+    @property
     def status(self):
         """ Where we are in the process """
         if self.errors:
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index 3afe01b..fc889c6 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -203,6 +203,10 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
             return _("Nothing selected")
 
     @property
+    def showable(self):
+        return not flags.livecdInstall and not self.data.method.method == "liveimg"
+
+    @property
     def status(self):
         if self.errors:
             return _("Error setting up software source")
-- 
1.9.3