Blame SOURCES/gtk_thread_issues_1240967.patch

fd2bce
From 498ba60ff643991a4561ab86a63fc32e09486c30 Mon Sep 17 00:00:00 2001
fd2bce
From: Vratislav Podzimek <vpodzime@redhat.com>
fd2bce
Date: Mon, 3 Aug 2015 10:26:41 +0200
fd2bce
Subject: [PATCH 1/7] Cover all potential places with a non-main thread
fd2bce
 changing Gtk stuff (#1240967)
fd2bce
fd2bce
There were a few more places where a non-main thread manipulated the Gtk objects
fd2bce
which sometimes caused Gtk and the whole anaconda to hang due to deadlocks. Make
fd2bce
sure all such actions are done in the main thread.
fd2bce
fd2bce
Signed-off-by: Vratislav Podzimek <vpodzime@redhat.com>
fd2bce
---
fd2bce
 org_fedora_oscap/gui/spokes/oscap.py | 9 +++++++--
fd2bce
 1 file changed, 7 insertions(+), 2 deletions(-)
fd2bce
fd2bce
diff --git a/org_fedora_oscap/gui/spokes/oscap.py b/org_fedora_oscap/gui/spokes/oscap.py
fd2bce
index e5ea225..38dabc1 100644
fd2bce
--- a/org_fedora_oscap/gui/spokes/oscap.py
fd2bce
+++ b/org_fedora_oscap/gui/spokes/oscap.py
fd2bce
@@ -40,7 +40,7 @@ from pyanaconda.threads import threadMgr, AnacondaThread
fd2bce
 from pyanaconda.ui.gui.spokes import NormalSpoke
fd2bce
 from pyanaconda.ui.communication import hubQ
fd2bce
 from pyanaconda.ui.gui.utils import gtk_action_wait, really_hide, really_show
fd2bce
-from pyanaconda.ui.gui.utils import set_treeview_selection, fire_gtk_action
fd2bce
+from pyanaconda.ui.gui.utils import set_treeview_selection, fire_gtk_action, GtkActionList
fd2bce
 
fd2bce
 from pykickstart.errors import KickstartValueError
fd2bce
 
fd2bce
@@ -407,8 +407,10 @@ class OSCAPSpoke(NormalSpoke):
fd2bce
         if self._using_ds:
fd2bce
             # populate the stores from items from the content
fd2bce
             self._ds_checklists = self._content_handler.get_data_streams_checklists()
fd2bce
+            add_ds_ids = GtkActionList()
fd2bce
             for dstream in self._ds_checklists.iterkeys():
fd2bce
-                self._add_ds_id(dstream)
fd2bce
+                add_ds_ids.add_action(self._add_ds_id, dstream)
fd2bce
+            add_ds_ids.fire()
fd2bce
         else:
fd2bce
             # hide the labels and comboboxes for datastream-id and xccdf-id
fd2bce
             # selection
fd2bce
@@ -470,6 +472,7 @@ class OSCAPSpoke(NormalSpoke):
fd2bce
 
fd2bce
         self._ds_store.append([ds_id])
fd2bce
 
fd2bce
+    @gtk_action_wait
fd2bce
     def _update_xccdfs_store(self):
fd2bce
         """
fd2bce
         Clears and repopulates the store with XCCDF IDs from the currently
fd2bce
@@ -485,6 +488,7 @@ class OSCAPSpoke(NormalSpoke):
fd2bce
         for xccdf_id in self._ds_checklists[self._current_ds_id]:
fd2bce
             self._xccdf_store.append([xccdf_id])
fd2bce
 
fd2bce
+    @gtk_action_wait
fd2bce
     def _update_profiles_store(self):
fd2bce
         """
fd2bce
         Clears and repopulates the store with profiles from the currently
fd2bce
@@ -528,6 +532,7 @@ class OSCAPSpoke(NormalSpoke):
fd2bce
         self._message_store.append([message.type, message.text])
fd2bce
 
fd2bce
     @dry_run_skip
fd2bce
+    @gtk_action_wait
fd2bce
     def _update_message_store(self, report_only=False):
fd2bce
         """
fd2bce
         Updates the message store with messages from rule evaluation.
fd2bce
-- 
fd2bce
2.1.0
fd2bce