[PATCH] Fix closest mirror showing up when it shouldn't (#1031663)
Brian C. Lane
bcl at redhat.com
Wed Jan 15 22:43:01 UTC 2014
On Wed, Jan 15, 2014 at 02:48:14PM +0100, Martin Kolman wrote:
> 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
We should stay consistent with the style of the other places that do this:
message = _("No mountable devices found")
self._window += [TextWidget(message), ""]
>
> _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))
Ack.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list