Skip to content

Commit

Permalink
slides/yocto-recipe-extra: 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 ddac84b commit 6981259
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions slides/yocto-recipe-extra/yocto-recipe-extra.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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()}"
}
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 6981259

Please sign in to comment.