[PATCH 2/2] Skip setting up env and groups in software spoke for ks (#1173350)

Vratislav Podzimek vpodzime at redhat.com
Mon Dec 15 09:20:22 UTC 2014



----- Original Message -----
> From: "Brian C. Lane" <bcl at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, December 12, 2014 1:33:19 AM
> Subject: [PATCH 2/2] Skip setting up env and groups in software spoke for ks	(#1173350)
> 
> When using a kickstart with a %packages section the software spoke _apply
> method should not setup the environment and groups. This has been
> clobbering the package groupList, causing kickstart selected groups to
> not be installed.
> ---
>  pyanaconda/ui/gui/spokes/software.py | 32 +++++++++++++++++---------------
>  1 file changed, 17 insertions(+), 15 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/software.py
> b/pyanaconda/ui/gui/spokes/software.py
> index 6f256c5..67b1b28 100644
> --- a/pyanaconda/ui/gui/spokes/software.py
> +++ b/pyanaconda/ui/gui/spokes/software.py
> @@ -105,21 +105,23 @@ class SoftwareSelectionSpoke(NormalSpoke):
>          if not env:
>              return
>  
> -        addons = self._get_selected_addons()
> -        for group in addons:
> -            if group not in self.selectedGroups:
> -                self.selectedGroups.append(group)
> -
> -        self._selectFlag = False
> -        self.payload.data.packages.groupList = []
> -        self.payload.selectEnvironment(env)
> -        self.environment = env
> -        for group in self.selectedGroups:
> -            self.payload.selectGroup(group)
> -
> -        # And then save these values so we can check next time.
> -        self._origAddons = addons
> -        self._origEnvironment = self.environment
> +        # Not a kickstart with packages, setup the environment and groups
> +        if not (flags.automatedInstall and self.data.packages.seen):
> +            addons = self._get_selected_addons()
> +            for group in addons:
> +                if group not in self.selectedGroups:
> +                    self.selectedGroups.append(group)
> +
> +            self._selectFlag = False
> +            self.payload.data.packages.groupList = []
> +            self.payload.selectEnvironment(env)
> +            self.environment = env
> +            for group in self.selectedGroups:
> +                self.payload.selectGroup(group)
> +
> +            # And then save these values so we can check next time.
> +            self._origAddons = addons
> +            self._origEnvironment = self.environment
>  
>          hubQ.send_not_ready(self.__class__.__name__)
>          hubQ.send_not_ready("SourceSpoke")
These both look good to me. 


More information about the anaconda-patches mailing list