From: Patrick Ohly <patrick.ohly@intel.com>
To: Chen Qi <Qi.Chen@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/4] base-files: respect VOLATILE_LOG_DIR
Date: Mon, 12 Dec 2016 09:01:20 +0100 [thread overview]
Message-ID: <1481529680.17535.194.camel@intel.com> (raw)
In-Reply-To: <ab38ee33f9231e77d0ce97eb56809c4e3eac4855.1479809328.git.Qi.Chen@windriver.com>
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.
next prev parent reply other threads:[~2016-12-12 8:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 10:10 [PATCH 0/4] Persistent /var/log support Chen Qi
2016-11-22 10:10 ` [PATCH 1/4] bitbake.conf: add VOLATILE_LOG_DIR variable Chen Qi
2016-11-22 10:10 ` [PATCH 2/4] base-files: respect VOLATILE_LOG_DIR Chen Qi
2016-12-12 8:01 ` Patrick Ohly [this message]
2016-11-22 10:10 ` [PATCH 3/4] initscripts: support persistent /var/log Chen Qi
2016-12-12 8:05 ` Patrick Ohly
2016-12-13 8:00 ` ChenQi
2016-11-22 10:10 ` [PATCH 4/4] package.bbclass: " Chen Qi
2016-11-29 10:28 ` [PATCH 0/4] Persistent /var/log support Jack Mitchell
-- strict thread matches above, loose matches on Subject: below --
2017-08-16 11:57 [PATCH V4 " Chen Qi
2017-08-16 11:57 ` [PATCH 2/4] base-files: respect VOLATILE_LOG_DIR Chen Qi
2015-03-24 8:42 [PATCH 0/4] Support persistent /var/log Chen Qi
2015-03-24 8:42 ` [PATCH 2/4] base-files: respect VOLATILE_LOG_DIR Chen Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481529680.17535.194.camel@intel.com \
--to=patrick.ohly@intel.com \
--cc=Qi.Chen@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox