On Sat, Sep 24, 2016 at 05:47:35PM -0700, Christopher Collins wrote:
[...]
> If two packages with the same priority attempt to override the same
> setting, newt raises an error and aborts the build. The remedy for this
> problem is for a higher-priority package to override the setting as
> well.
Correction: If two packages with the same priority attempt to override
the same setting *with different values*, newt raises an error and
aborts the build.
Put another way:
Newt reports an error and aborts the build upon detection of an
ambiguous syscfg override. A syscfg setting is ambiguous if both of the
following are true:
* The final 2+ overrides are done by packages of the same priority
* Of the above overrides, not all values are identical
Hypothetical examples:
1. Ambiguous:
[sys/log/pkg.yml]
pkg.syscfg_defs:
LOG_LEVEL:
description: 'TBD'
value: 0
[net/nimble/host/pkg.yml]
pkg.syscfg_vals:
LOG_LEVEL: 1
[libs/os/pkg.yml]
pkg.syscfg_vals:
LOG_LEVEL: 0
This is ambiguous because two packages of the same priority
(net/nimble/host and libs/os are both library packages) override a
setting with different values.
2. Unambiguous:
[sys/log/pkg.yml]
pkg.syscfg_defs:
LOG_LEVEL:
description: 'TBD'
value: 0
[net/nimble/host/pkg.yml]
pkg.syscfg_vals:
LOG_LEVEL: 1
[libs/os/pkg.yml]
pkg.syscfg_vals:
LOG_LEVEL: 0
[apps/myapp/pkg.yml]
pkg.syscfg_vals:
LOG_LEVEL: 3
The ambiguity is resolved because a higher priority package overrides
the setting.
3. Unambiguous:
[sys/log/pkg.yml]
pkg.syscfg_defs:
LOG_LEVEL:
description: 'TBD'
value: 0
[net/nimble/host/pkg.yml]
pkg.syscfg_vals:
LOG_LEVEL: 1
[libs/os/pkg.yml]
pkg.syscfg_vals:
LOG_LEVEL: 1
Both overrides specify identical values, so there is no ambiguity.
4. Unambiguous:
[sys/log/pkg.yml]
pkg.syscfg_defs:
LOG_LEVEL:
description: 'TBD'
value: 0
[net/nimble/host/pkg.yml]
pkg.syscfg_vals:
LOG_LEVEL: 1
The original setting definition does not factor into ambiguity
detection. There is only one override here, so an ambiguity is not
possible.
Thanks,
Chris