[OE-core] [PATCH 2/4] base-files: respect VOLATILE_LOG_DIR

Patrick Ohly patrick.ohly at intel.com
Mon Dec 12 08:01:20 UTC 2016


On Tue, 2016-11-22 at 18:10 +0800, Chen Qi wrote:
> -           ${localstatedir}/volatile/log \
> +           ${localstatedir}/${@['',
> 'volatile/'][d.getVar('VOLATILE_LOG_DIR', True) == 'yes']}log \

I find the "if/else" expression easier to read, there's no need for an
explicit d.getVar(), and there's an utility method for variables which
are meant to be booleans:
   ${@ 'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR'}) else '' }

Using the utility function ensures that typos are caught and allows
several other values besides yes/no.

The change itself of course works either way. Just my 2 cents ;-}

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.






More information about the Openembedded-core mailing list