There were a couple of major problems with this:
-- selection was not getting applied and minimal install always
applied during installation
-- the way I handled threading in this spoke initially made things
a bit screwy, causing the occasional traceback
These amendments should make things behave much better now.
---
pyanaconda/ui/tui/spokes/software.py | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/pyanaconda/ui/tui/spokes/software.py b/pyanaconda/ui/tui/spokes/software.py
index b6912b9..63ca145 100644
--- a/pyanaconda/ui/tui/spokes/software.py
+++ b/pyanaconda/ui/tui/spokes/software.py
@@ -37,13 +37,14 @@ class SoftwareSpoke(NormalTUISpoke):
title = _("Software selection")
category = "software"
+ # default to first selection (Gnome) in list of environments
+ _selection = 0
+
def __init__(self, app, data, storage, payload, instclass):
NormalTUISpoke.__init__(self, app, data, storage, payload, instclass)
self._ready = False
self.errors = []
self._tx_id = None
- # default to first selection (Gnome) in list of environments
- self._selection = 0
self.environment = None
# for detecting later whether any changes have been made
@@ -134,15 +135,14 @@ class SoftwareSpoke(NormalTUISpoke):
def input(self, args, key):
""" Handle the input; this chooses the desktop environment.
"""
- if key.lower() == "c" and self._selection - 1 in
range(len(self.payload.environments)):
+ if key.lower() == "c" and self._selection in
range(len(self.payload.environments)):
self.apply()
- return False
try:
keyid = int(key) - 1
if keyid in range(len(self.payload.environments)):
self._selection = keyid
- return False
+ return None
except (ValueError, IndexError):
return key
@@ -158,19 +158,17 @@ class SoftwareSpoke(NormalTUISpoke):
""" Apply our selections """
self._apply()
self.data.packages.seen = True
+ threadMgr.add(AnacondaThread(name=THREAD_CHECK_SOFTWARE,
+ target=self.checkSoftwareSelection))
def _apply(self):
""" Private apply. """
- try:
- self.environment = self.payload.environments[self._selection]
- self.data.packages.seen = True
- except IndexError:
+ self.environment = self.payload.environments[self._selection]
+ if not self.environment:
return
self.payload.selectEnvironment(self.environment)
self._origEnv = self.environment
- threadMgr.add(AnacondaThread(name=THREAD_CHECK_SOFTWARE,
- target=self.checkSoftwareSelection))
def checkSoftwareSelection(self):
""" Depsolving """
--
1.7.11.7