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

Burton, Ross ross.burton at intel.com
Mon Jan 7 20:02:34 UTC 2019


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 have no problem with it, but I'm curious why we use @CC instead of
> @@CC@@ style here. Is there an issue with @@CC@@ style?

Because that's how string.Template works.

Ross


More information about the Openembedded-core mailing list