[FE training-materials-updates] buildroot-new-packages: add a slide about the namespace being global

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Tue May 5 16:18:13 CEST 2015


Repository : git://git.free-electrons.com/training-materials.git

On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=2f7cb52ce9709c11f768919d9ab14514b2875f5d

>---------------------------------------------------------------

commit 2f7cb52ce9709c11f768919d9ab14514b2875f5d
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date:   Tue May 5 16:17:36 2015 +0200

    buildroot-new-packages: add a slide about the namespace being global
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>


>---------------------------------------------------------------

2f7cb52ce9709c11f768919d9ab14514b2875f5d
 slides/buildroot-new-packages/buildroot-new-packages.tex | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/slides/buildroot-new-packages/buildroot-new-packages.tex b/slides/buildroot-new-packages/buildroot-new-packages.tex
index 85ec549..7e97097 100644
--- a/slides/buildroot-new-packages/buildroot-new-packages.tex
+++ b/slides/buildroot-new-packages/buildroot-new-packages.tex
@@ -398,6 +398,21 @@ endef
   \end{itemize}
 \end{frame}
 
+\begin{frame}{Naming conventions: global namespace}
+  \begin{itemize}
+  \item The package infrastructure expects all variables it uses to be
+    prefixed by the uppercase package name.
+  \item If your package needs to define additional private variables
+    not used by the package infrastructure, they {\bf should} also be
+    prefixed by the {\bf uppercase package name}.
+  \item The {\bf namespace of variables is global} in Buildroot!
+    \begin{itemize}
+    \item If two packages created a variable named \code{BUILD_TYPE},
+      it will silently conflict.
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
 \begin{frame}{Behind the scenes}
   \begin{itemize}
   \item Behind the scenes, \code{$(eval $(generic-package))}:



More information about the training-materials-updates mailing list