summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2009-10-13 12:29:31 -0400
committerBill Nottingham <notting@redhat.com>2009-10-13 13:43:18 -0400
commitc1a61692d8da8225e6ec158168f94ff46d824f15 (patch)
treed290ee76cf9f146ea69c412a80230d1cfe2f55e9
parent3d360b6abd0b4017a8265838d34ec8d1c2518251 (diff)
downloadanaconda-c1a61692d8da8225e6ec158168f94ff46d824f15.tar.gz
anaconda-c1a61692d8da8225e6ec158168f94ff46d824f15.tar.xz
anaconda-c1a61692d8da8225e6ec158168f94ff46d824f15.zip
Fix task selection when tasks contain the same group. (#528193)
If we just iterate over the task list selecting and deselecting groups, then we'll deselect groups we want if a later task also contains those groups. So deselect all unchecked tasks, then select all checked tasks.
-rw-r--r--iw/task_gui.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/iw/task_gui.py b/iw/task_gui.py
index ae871790a..aeacd4849 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -488,15 +488,12 @@ class TaskWindow(InstallWindow):
self.dispatch.skipStep("group-selection", skip = 1)
tasks = self.xml.get_widget("taskList").get_model()
- for (cb, task, grps) in tasks:
- # we just set things as default or not; group selection
- # happens after this screen.
- if cb:
- map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
- "default", True), grps)
- else:
- map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
- "default", False), grps)
+ for (cb, task, grps) in filter(lambda x: not x[0], tasks):
+ map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
+ "default", False), grps)
+ for (cb, task, grps) in filter(lambda x: x[0], tasks):
+ map(lambda g: setattr(self.backend.ayum.comps.return_group(g),
+ "default", True), grps)
def _editRepo(self, *args):
repo = None