Fwd: Identify 3rd party source in spec?

Christian MAUDERER christian.mauderer at embedded-brains.de
Wed Nov 2 07:10:28 UTC 2022


Hello Chris,

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.

Best regards

Christian
-- 
--------------------------------------------
embedded brains GmbH
Herr Christian MAUDERER
Dornierstr. 4
82178 Puchheim
Germany
email:  christian.mauderer at embedded-brains.de
phone:  +49-89-18 94 741 - 18
mobile: +49-176-152 206 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