[PATCH] Fix closest mirror showing up when it shouldn't (#1031663)

Martin Kolman mkolman at redhat.com
Wed Jan 15 13:48:14 UTC 2014


We are not shipping the fastest mirror plugin in RHEL7,
so the closest mirror source option should not be shown.

We do this by waiting for the payload processing thread
to finish - the payload detects the fastest mirror plugin
is not installed and the closest mirror option is removed
from the menu.

If the user tries to access the source spoke before the
source & payload processing is done, he can either press
r to try again or c to return to the hub and interact with
other spokes.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 pyanaconda/ui/tui/spokes/source.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index af3c35f..2e30b71 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -229,7 +229,13 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
     def refresh(self, args=None):
         EditTUISpoke.refresh(self, args)
 
-        threadMgr.wait(THREAD_PAYLOAD_MD)
+        if not self.ready:
+            message = TextWidget(_("Installation source refresh in progress, try again later."))
+            self._window.append(message)
+
+            # add some more space below
+            self._window.append(TextWidget(""))
+            return True
 
         _methods = [_("CD/DVD"), _("Local ISO file"), _("Network")]
         if args == 3:
@@ -332,6 +338,7 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
     def ready(self):
         """ Check if the spoke is ready. """
         return (self._ready and
+                not threadMgr.get(THREAD_PAYLOAD) and
                 not threadMgr.get(THREAD_PAYLOAD_MD) and
                 not threadMgr.get(THREAD_SOFTWARE_WATCHER) and
                 not threadMgr.get(THREAD_CHECK_SOFTWARE))
-- 
1.8.4.2



More information about the anaconda-patches mailing list