[master/f20] tui: wait for threads before entering source and software (#1032823)

Brian C. Lane bcl at redhat.com
Wed Nov 20 22:48:58 UTC 2013


From: "Brian C. Lane" <bcl at redhat.com>

When first run THREAD_PAYLOAD is running. You shouldn't change the
source while this is happening.

Software shouldn't be changed in the middle of THREAD_CHECK_SOFTWARE
---
 pyanaconda/ui/tui/spokes/software.py | 2 ++
 pyanaconda/ui/tui/spokes/source.py   | 1 +
 2 files changed, 3 insertions(+)

diff --git a/pyanaconda/ui/tui/spokes/software.py b/pyanaconda/ui/tui/spokes/software.py
index 87eaefc..d7f6bbb 100644
--- a/pyanaconda/ui/tui/spokes/software.py
+++ b/pyanaconda/ui/tui/spokes/software.py
@@ -126,6 +126,8 @@ class SoftwareSpoke(NormalTUISpoke):
             self._window.append(TextWidget(""))
             return True
 
+        threadMgr.wait(THREAD_CHECK_SOFTWARE)
+
         # put a title above the list and some space below it
         self._window.append(TextWidget(_("Base environment")))
         self._window.append(TextWidget(""))
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index 79ac1e0..e48b9b9 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -226,6 +226,7 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
     def refresh(self, args=None):
         EditTUISpoke.refresh(self, args)
 
+        threadMgr.wait(THREAD_PAYLOAD)
         threadMgr.wait(THREAD_PAYLOAD_MD)
 
         _methods = [_("CD/DVD"), _("Local ISO file"), _("Network")]
-- 
1.8.3.1



More information about the anaconda-patches mailing list