Fwd: Identify 3rd party source in spec?
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Nov 4 07:42:22 UTC 2022
On 02/11/2022 08:10, Christian MAUDERER wrote:
> Am 01.11.22 um 22:08 schrieb Chris Johns:
>> On 2/11/2022 3:25 am, oss at c-mauderer.de wrote:> Is it a good idea to
>> make it a
>> mandatory attribute? It makes the yaml files
>>> bigger. It will only mean that we have to look for copy and paste
>>> bugs instead
>>> of missing attributes if someone adds a new third party library.
>>
>> Can you avoid having to add the item to all? I am no spec build system
>> expert
>> (having invested time) and seem to remember needing to hit a lot of
>> files when
>> adding something ...
>>
>> https://git.rtems.org/rtems/commit/?id=6f2aa8ad36e3aaffc9fa2cb8c744b04da7339ee2
>>
>> Chris
>
> The documentation mentions at least some optional attributes in the
> specification files. For example "format" in a build option item or the
> "do-configure" in a build script item:
>
> https://docs.rtems.org/branches/master/eng/req/items.html#build-option-item-type
> https://docs.rtems.org/branches/master/eng/req/items.html#build-script-item-type
>
> But I think the wscript has to take into account that the value might
> not exist. I'm not sure whether it does that for the existing "optional"
> attributes. For example my first guess would be that the "do-configure"
> could throw a KeyError:
>
> https://git.rtems.org/rtems/tree/wscript#n1127
>
> def do_configure(self, conf, cic):
> script = self.data["do-configure"]
> if script:
> exec(script)
>
> Usually I would have expected the following code instead:
>
> def do_configure(self, conf, cic):
> try:
> script = self.data["do-configure"]
> except KeyError:
> script = None
> if script:
> exec(script)
>
> So I can't clearly answer your question. I would have to try it. But
> regardless whether there are currently such options or not: They
> shouldn't be hard to implement. I just hope that this doesn't break some
> use case. I'll try to remember to ask Sebastian about it next week.
When I worked on the new build system there was a discussion whether all
attributes should be explicit in the items or not. It was decided to
make all attributes mandatory in the items. We could of course
reconsider this decision, however, from my point of view it was a good
decision. It keeps the wscript code simple and the items are
self-contained. You don't have to know the source code to figure out
what an item describes.
Changing the items is very simple with a Python script which uses the
stuff in rtems-central. Simple things can be done using grep and sed.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list