[rhinstaller/anaconda/pulls/323 master] Fix first run environment setup in software spoke

M4rtinK installerbot-noreply at redhat.com
Tue Aug 25 08:58:17 UTC 2015


> @@ -396,7 +396,7 @@ def refresh(self):
>              elif firstEnvironment:  # manual installation
>                  # for manual installs that don't have a default provided by the install class
>                  # just tick the first radio button and select the first environment
> -                if not self.environment_valid:
> +                if not self.environment_valid or self.environment is None:

The idea is that None indicates that an environment has not been set, which is a valid value of the environment variable (which is just wrapping the environment variable from kickstart).
Existing environments (like for example @^infrastructure-server-environment) also evaluate as valid. Non existent environments (@^foo-bar) on the other hand evaluate as invalid.

Previously we didn't really do any environment validation at all and a wrong environment specification in kickstart was enough to crash the installation, so I've (among other changes) added this property.

I do agree that environment being None could be rather unintuitive and I'm open to improvement ideas. Maybe we can add a "environment_set" property that indicates that the environment has been set to some (not necessarily valid) value ? On the other hand the software spoke is already quite complex with all its various states and transitions.

-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/323#discussion_r37845765


More information about the anaconda-patches mailing list