[PATCH 3/3] Don't show the EULA spoke in reconfig mode if license is already accepted (#1110439)

Vratislav Podzimek vpodzime at redhat.com
Fri Jul 3 07:07:18 UTC 2015


On Wed, 2015-07-01 at 14:01 +0200, Martin Kolman wrote:
> It doesn't make sense to show it again if the license has already been
> accepted during a previous Initial Setup run.
> 
> Related: rhbz#1110439
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
>  initial_setup/gui/spokes/eula.py | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/initial_setup/gui/spokes/eula.py b/initial_setup/gui/spokes/eula.py
> index 342910f..fa08538 100644
> --- a/initial_setup/gui/spokes/eula.py
> +++ b/initial_setup/gui/spokes/eula.py
> @@ -6,6 +6,7 @@ import logging
>  from pyanaconda.ui.common import FirstbootOnlySpokeMixIn
>  from pyanaconda.ui.gui.spokes import NormalSpoke
>  from pyanaconda.constants import FIRSTBOOT_ENVIRON
> +from pykickstart.constants import FIRSTBOOT_RECONFIG
>  
>  from initial_setup.product import get_license_file_name
>  from initial_setup.common import LicensingCategory
> @@ -96,8 +97,12 @@ class EULAspoke(FirstbootOnlySpokeMixIn, NormalSpoke):
>  
>      @classmethod
>      def should_run(cls, environment, data):
> -        # the EULA spoke should always run, but only in Initial Setup
> +        # the EULA spoke should only run in Initial Setup
>          if environment == FIRSTBOOT_ENVIRON:
> +            # don't run if we are in reconfig mode and the EULA has already been accepted
> +            if data and data.firstboot.firstboot == FIRSTBOOT_RECONFIG and data.eula.agreed:
> +                log.debug("not running license spoke: reconfig mode & license already accepted")
> +                return False
>              return True
I think this needs to be done for the TUI EULA spoke too.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list