On 01/07/2015 12:32 PM, Adam Williamson wrote:
On Wed, 2015-01-07 at 12:03 -0500, David Shea wrote:
This method is used in the software spoke to deselect groups added via the environment, and having the optional groups in there doesn't do any good since any selected optional groups would have been selected by the user.
I don't know exactly what the code is for, but just reading the commit message - is "any selected optional groups would have been selected by the user" 100% true? I believe comps allows the possibility of a 'default optional group', one that's selected by default (the difference between that and a non-optional one being that the user can choose not to have it). Not sure if that makes a difference to the change, but thought I'd point it out.
In depth analysis:
The situation you are describing is a groupid with a default="true" attribute in the optionlist. In rawhide there are all in xfce.
<environment> <id>xfce-desktop-environment</id> ... <optionlist> <groupid default="true">xfce-apps</groupid> <groupid default="true">xfce-media</groupid> ... </optionlist> </environment>
In the software spokes, such groups are detected and selected by using payload.environmentOptionIsDefault.
def environmentOptionIsDefault(self, environmentid, grpid): env = self._base.comps.environment_by_pattern(environmentid) if env is None: raise packaging.NoSuchGroup(environmentid) return False
What's wrong with that is left as an exercise to the reader.
But you are correct, this change breaks some cases of picking an environment and fiddling with the addons and picking a different environment. So another patch is forthcoming. And a bug to get dnf to implement something like yum's environment.defaultoptions.