[OE-core] [PATCH] tzdata: Make /etc/timezone optional

Burton, Ross ross.burton at intel.com
Tue Jan 5 13:03:03 UTC 2016


On 23 December 2015 at 23:51, Haris Okanovic <haris.okanovic at ni.com> wrote:

> +CONFFILES_${PN} +=
> "${@['','${sysconfdir}/timezone'][d.getVar('INSTALL_TIMEZONE_FILE', True)
> == '1']}"
>

This idiom (indexing an array by a coerced boolean) is pretty difficult to
read and bitbake has a helper function to turn a string into a bool, so I
find something like this a lot easier to read:

${@"${sysconfdir}/timezone" if
bb.utils.to_boolean(d.getVar("INSTALL_TIMEZONE_FILE", True)) else ""}

(untested!)

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160105/e8d17ddb/attachment-0002.html>


More information about the Openembedded-core mailing list