[OE-core] [PATCH 3/7] meson: fix nativesdk-meson for multilib SDKs

Martin Kelly mkelly at xevo.com
Mon Jan 7 20:07:24 UTC 2019


On 1/7/19 12:02 PM, Burton, Ross wrote:
> On Mon, 7 Jan 2019 at 19:03, Martin Kelly <mkelly at xevo.com> wrote:
>>> +with open(template_file) as in_file:
>>> +    template = in_file.read()
>>> +    output = Template(template).substitute(Environ())
>>> +    with open(cross_file, "w") as out_file:
>>> +        out_file.write(output)
>>
>> I like using string.Template instead of custom logic, but shouldn't we
>> keep the atomic rename logic? If someone hits control-C or the
>> extraction process crashes during the write, we don't want a corrupt
>> file due to a partial write.
> 
> If someone control-c's during SDK unpack, the SDK isn't usable.
> 

I don't think it will break cleanly though; instead, some things will 
work and other things won't. I was trying to avoid cryptic error 
messages such as meson hitting a syntax error. However, I agree that 
this should be addressed globally. Separate from this change, maybe we 
should drop a semaphore at the end of extraction and check it in the env 
setup script, so we can display a nice message if something didn't complete.


More information about the Openembedded-core mailing list