[OE-core] [PATCH] tzdata: Make /etc/timezone optional
Haris Okanovic
haris.okanovic at ni.com
Tue Jan 5 19:03:17 UTC 2016
On 01/05/2016 07:03 AM, Burton, Ross wrote:
>
> On 23 December 2015 at 23:51, Haris Okanovic <haris.okanovic at ni.com
> <mailto: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!)
I agree the alternative is much easier to read, and verified it works as
expected. Posting V2 shortly.
Thanks for looking into it!
-- Haris
More information about the Openembedded-core
mailing list