[PATCH] Fix problems when changing things in the software spoke (#868742, #869424).

Vratislav Podzimek vpodzime at redhat.com
Mon Oct 29 10:30:10 UTC 2012


On Fri, 2012-10-26 at 12:05 -0400, Chris Lumens wrote:
> We shouldn't be modifying ksdata in the on_environment_changed handler, for
> starters.  That should only happen in apply.
> ---
>  pyanaconda/ui/gui/spokes/software.py | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
> index 2c7dcab..34dd6b3 100644
> --- a/pyanaconda/ui/gui/spokes/software.py
> +++ b/pyanaconda/ui/gui/spokes/software.py
> @@ -257,9 +257,6 @@ class SoftwareSelectionSpoke(NormalSpoke):
>  
>                      self._addonStore.append([selected, "<b>%s</b>\n%s" % (name, desc), grp])
>  
> -        self.selectedGroups = [g.name for g in self.data.packages.groupList]
> -        self.excludedGroups = [g.name
> -                                for g in self.data.packages.excludedGroupList]
>          self._selectFlag = True
>  
>          if self._errorMsgs:
> @@ -290,12 +287,11 @@ class SoftwareSelectionSpoke(NormalSpoke):
>          for row in self._environmentStore:
>              row[0] = False
>  
> -        # Remove all groups from the previous environment from the selected
> -        # list, but don't explicitly exclude them.
> +        # Then, remove all the groups that were selected by the previously
> +        # selected environment.
>          for groupid in self.payload.environmentGroups(self.environment):
> -            grp = Group(groupid)
> -            if grp in self.data.packages.groupList:
> -                self.data.packages.groupList.remove(grp)
> +            if groupid in self.selectedGroups:
> +                self.selectedGroups.remove(groupid)
>  
>          # Then mark the clicked environment as selected and update the screen.
>          self._environmentStore[path][0] = True
Looks good to me.

-- 
Vratislav Podzimek

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



More information about the anaconda-patches mailing list