[PATCH v2] build: Use BSP family for options

Chris Johns chrisj at rtems.org
Wed Jul 14 07:21:42 UTC 2021


On 14/7/21 5:01 pm, Sebastian Huber wrote:
> On 14/07/2021 08:51, chrisj at rtems.org wrote:
>> @@ -695,12 +692,18 @@ class OptionItem(Item):
>>                   return True
>>           return False
>>   -    def default_value(self, variant):
>> +    def default_value(self, variant, family):
>>           value = self.data["default"]
>>           for default in self.data["default-by-variant"]:
>>               if OptionItem._is_variant(default["variants"], variant):
>>                   value = default["value"]
>>                   break
>> +        if 'default-by-family' in self.data:
>> +            for default in self.data["default-by-family"]:
>> +                if 'families' in default:
>> +                    if OptionItem._is_variant(default["families"], family):
>> +                        value = default["value"]
>> +                        break
> 
> During the discussion of the build items, we agreed that all attributes should
> be explicit in the items. So, a "default-by-family: []" should be added to all
> BSP items.

OK I will generate a v3 patch.

Is there a nice way to catch any missing fields and report them? The waf conf is
not present and I am not sure if we catch any standard python exception and
report them by waf?

Chris


More information about the devel mailing list