[PATCH 3/3] Make Software spoke ready even if there is no repo (#1010348)

Samantha N. Bueno sbueno+anaconda at redhat.com
Mon Oct 21 14:14:07 UTC 2013


I think this one is fine also.

On Wed, Oct 16, 2013 at 03:26:23PM +0200, Vratislav Podzimek wrote:
> Nothing can be done in the Software spoke if the repository is not set up, but
> automated installations wait for all spokes to become ready which never happens
> if there is no repo specified in the kickstart. The Software spoke thus needs to
> inform user what to do, but has to be ready/visitable.
> 
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
>  pyanaconda/ui/tui/spokes/software.py | 21 +++++++++++++++++----
>  1 file changed, 17 insertions(+), 4 deletions(-)
> 
> diff --git a/pyanaconda/ui/tui/spokes/software.py b/pyanaconda/ui/tui/spokes/software.py
> index 8b3d19d..087cc5b 100644
> --- a/pyanaconda/ui/tui/spokes/software.py
> +++ b/pyanaconda/ui/tui/spokes/software.py
> @@ -79,6 +79,8 @@ class SoftwareSpoke(NormalTUISpoke):
>              return _("Error checking software selection")
>          if not self.ready:
>              return _("Processing...")
> +        if not self.payload.getBaseRepo(wait=False):
> +            return _("Installation source not set up")
>          if not self.txid_valid:
>              return _("Source changed - please verify")
>  
> @@ -107,14 +109,26 @@ class SoftwareSpoke(NormalTUISpoke):
>                           not self.errors and self.txid_valid
>  
>          if flags.automatedInstall:
> -            return processingDone and self.data.packages.seen
> +            return processingDone and self.payload.getBaseRepo(wait=False) and self.data.packages.seen
>          else:
> -            return self.environment is not None and processingDone
> +            return self.payload.getBaseRepo(wait=False) and self.environment is not None and processingDone
>  
>      def refresh(self, args=None):
>          """ Refresh screen. """
>          NormalTUISpoke.refresh(self, args)
>  
> +        if not self.payload.getBaseRepo(wait=False):
> +            message = TextWidget(_("Installation source needs to be set up first."))
> +            self._window.append(message)
> +
> +            # add some more space below
> +            self._window.append(TextWidget(""))
> +            return True
> +
> +        # put a title above the list and some space below it
> +        self._window.append(TextWidget(_("Base environment")))
> +        self._window.append(TextWidget(""))
> +
>          environments = self.payload.environments
>  
>          displayed = []
> @@ -160,8 +174,7 @@ class SoftwareSpoke(NormalTUISpoke):
>          """ If we're ready to move on. """
>          return (not threadMgr.get(THREAD_SOFTWARE_WATCHER) and
>                  not threadMgr.get(THREAD_PAYLOAD_MD) and
> -                not threadMgr.get(THREAD_CHECK_SOFTWARE) and
> -                self.payload.getBaseRepo() is not None)
> +                not threadMgr.get(THREAD_CHECK_SOFTWARE))
>  
>      def apply(self):
>          """ Apply our selections """
> -- 
> 1.7.11.7
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches


More information about the anaconda-patches mailing list