On 01/05/2016 07:03 AM, Burton, Ross wrote:
On 23 December 2015 at 23:51, Haris Okanovic <[email protected] <mailto:[email protected]>> 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 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
