[PATCH] Fix a race condition with kickstarts (#868834)

Jesse Keating jkeating at redhat.com
Fri Oct 26 03:40:05 UTC 2012


We were simluating the continue click before consuming all the messages
in the queue, which would cause the next hub to be in use, but we were
attempting to process messages for the previous hub.  It would cause a
crash of anaconda, but not a backtrace that could be caught with our
autoreporter.  The solution is to only continue when the queue is empty.

This also makes use of a property to see if we are ready to continue
instead of duplicating code.
---
 pyanaconda/ui/gui/hubs/__init__.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index 13f6192..3a88cc3 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -278,11 +278,12 @@ class Hub(GUIObject, common.Hub):
                     if not args[1]:
                         spoke.execute()
 
-                    if len(self._incompleteSpokes) == 0 and len(self._notReadySpokes) == 0:
+                    if self.continuePossible:
                         if self._inSpoke:
                             self._autoContinue = True
                         else:
-                            self.continueButton.emit("clicked")
+                            if q.empty():
+                                self.continueButton.emit("clicked")
             elif code == communication.HUB_CODE_MESSAGE:
                 spoke.selector.set_property("status", args[1])
 
-- 
1.7.11.4



More information about the anaconda-patches mailing list