Skip to content

Commit

Permalink
slides/yocto-recipe-extra: update example, add details
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Opdenacker <[email protected]>
  • Loading branch information
Michael Opdenacker committed Jan 22, 2024
1 parent 6981259 commit 4adc483
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions slides/yocto-recipe-extra/yocto-recipe-extra.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 4adc483

Please sign in to comment.