[PATCH] Fix task selection when tasks contain the same group. (#528193)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
---
 iw/task_gui.py |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/iw/task_gui.py b/iw/task_gui.py
index ae87179..aeacd48 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
-- 
1.6.5.rc2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux