Platform configs silently override user configs
The change was introduced by @nirbheek in 98dae501
- the context:
_load_platform_config()
is called after_load_cmd_config(filename)
inConfig.load(filename, vars)
- logically, it should be in reverted order (the platform is the base of the user config), but the information about the platform, distro, arch, etc. is defined by the user config; this could be resolved by parsing the user config twice: first to guess the info for
_load_platform_config()
, and secondly to do a final job - the
variants
variable becameVariants
instance; before it was alist
, it was possible to check with the help of'name' in variants
if the variant is set already by the user config - Since the change,
Variants.override()
is used in platform config files to unconditionally set variants; this silently overrides values possibly set by the user config
Back link: 98dae501 (comment 2478969)
Edited by Maxim P. DEMENTIEV