[bootlin/training-materials updates] master: yocto: slides: clarify operator caveats (parsing order) with an example (c28ccae1)
Luca Ceresoli
luca.ceresoli at bootlin.com
Wed Sep 28 09:58:05 CEST 2022
Repository : https://github.com/bootlin/training-materials
On branch : master
Link : https://github.com/bootlin/training-materials/commit/c28ccae1565481c9c53f2b71f5aab0d6c073dc1a
>---------------------------------------------------------------
commit c28ccae1565481c9c53f2b71f5aab0d6c073dc1a
Author: Luca Ceresoli <luca.ceresoli at bootlin.com>
Date: Wed Sep 28 09:07:03 2022 +0200
yocto: slides: clarify operator caveats (parsing order) with an example
Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
>---------------------------------------------------------------
c28ccae1565481c9c53f2b71f5aab0d6c073dc1a
slides/yocto-advanced/yocto-advanced.tex | 34 +++++++++++++++++++++++++++-----
1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/slides/yocto-advanced/yocto-advanced.tex b/slides/yocto-advanced/yocto-advanced.tex
index ccd27e5a..3ffdc4d7 100644
--- a/slides/yocto-advanced/yocto-advanced.tex
+++ b/slides/yocto-advanced/yocto-advanced.tex
@@ -67,14 +67,38 @@
\end{itemize}
\end{frame}
-\begin{frame}
+\begin{frame}[fragile]
\frametitle{Operators caveats}
\begin{itemize}
\item The operators apply their effect during parsing
- \item The parsing order is difficult to predict, no assumption should
- be made about it.
- \item Example: if \code{+=} is parsed before \code{?=}, the latter will
- be discarded.
+ \item Example:
+ \end{itemize}
+ \begin{columns}
+ \column{0.2\textwidth}
+ \column{0.3\textwidth}
+ \begin{block}{}
+ \begin{minted}{text}
+VAR ?= "a"
+VAR += "b"
+ \end{minted}
+ \end{block}
+ Result: \code{VAR = "a b"}
+ \break
+ \column{0.3\textwidth}
+ \begin{block}{}
+ \begin{minted}{text}
+VAR += "b"
+VAR ?= "a"
+ \end{minted}
+ \end{block}
+ Result: \code{VAR = "b"}
+ \break
+ \column{0.2\textwidth}
+ \end{columns}
+
+ \begin{itemize}
+ \item The parsing order of files is difficult to predict, no assumption
+ should be made about it.
\item To avoid the problem, avoid using \code{+=}, \code{=+}, \code{.=}
and \code{=.} in \code{$BUILDDIR/conf/local.conf}. Always use
overrides (see following slides).
More information about the training-materials-updates
mailing list