From 4adc483262fe8d0efedc3bc5600be4bcf32c66d3 Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Sun, 21 Jan 2024 22:24:41 -0500 Subject: [PATCH] slides/yocto-recipe-extra: update example, add details Signed-off-by: Michael Opdenacker --- slides/yocto-recipe-extra/yocto-recipe-extra.tex | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/slides/yocto-recipe-extra/yocto-recipe-extra.tex b/slides/yocto-recipe-extra/yocto-recipe-extra.tex index 12a3c8d27d..65f49d0405 100644 --- a/slides/yocto-recipe-extra/yocto-recipe-extra.tex +++ b/slides/yocto-recipe-extra/yocto-recipe-extra.tex @@ -300,17 +300,18 @@ \subsection{Conditional features} \item \code{bb.utils.contains(variable, checkval, trueval, falseval, d)}: if \code{checkval} is found in \code{variable}, \code{trueval} is returned; otherwise - \code{falseval} is used. + \code{falseval} is used. \code{d} is the BitBake datastore. \item \code{bb.utils.filter(variable, checkvalues, d)}: returns all the words in the variable that are present in the checkvalues. - \item Example: + \item Example (\code{meta/recipes-connectivity/connman/connman.inc}): \begin{block}{} - \fontsize{9}{9}\selectfont + \fontsize{7.7}{7.7}\selectfont \begin{minted}{sh} PACKAGECONFIG ??= "wispr iptables client\ - ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \ " \end{minted} \end{block}