From 698125928e4fa9fd0d0fc7950a549e264956c8f4 Mon Sep 17 00:00:00 2001 From: Michael Opdenacker Date: Sun, 21 Jan 2024 21:07:20 -0500 Subject: [PATCH] slides/yocto-recipe-extra: add details Signed-off-by: Michael Opdenacker --- slides/yocto-recipe-extra/yocto-recipe-extra.tex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/slides/yocto-recipe-extra/yocto-recipe-extra.tex b/slides/yocto-recipe-extra/yocto-recipe-extra.tex index cdac9bf206..12a3c8d27d 100644 --- a/slides/yocto-recipe-extra/yocto-recipe-extra.tex +++ b/slides/yocto-recipe-extra/yocto-recipe-extra.tex @@ -109,7 +109,7 @@ \subsection{Using Python code in metadata} \frametitle{Python code examples} \small \begin{minted}{python} -# Anonymous function +# Anonymous function (automatically called at parsing time) python __anonymous() { if d.getVar("FOO", True) == "example": d.setVar("BAR", "Hello, World.") @@ -121,7 +121,7 @@ \subsection{Using Python code in metadata} } \end{minted} \begin{minted}{sh} -# Inline +# Inline Python code do_install() { echo "Build OS: ${@os.uname()[0].lower()}" } @@ -150,10 +150,11 @@ \subsection{Variable flags} \end{frame} \begin{frame}[fragile] - \frametitle{Examples} + \frametitle{Variable flags examples} \begin{itemize} \item \code{dirs}: directories that should be created before the task runs. The last one becomes the work directory for the task. + Example: \code{do_fetch} in \code{base.bbclass}. \begin{minted}{sh} do_compile[dirs] = "${B}" \end{minted}