bitbake: bitbake-user-manual: Enhance environment variable discussion.
Fixes [YOCTO #8567] Updated the variable list describing the variables that affect how environment variables are handled. Also updated the section on how those variables are passed. (Bitbake rev: 91cb52b1e77bba9d046239933b5c0513d01e6824) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
f11de9d205
commit
da22add33b
|
@ -116,16 +116,35 @@
|
||||||
Prior to parsing configuration files, Bitbake looks
|
Prior to parsing configuration files, Bitbake looks
|
||||||
at certain variables, including:
|
at certain variables, including:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link></para></listitem>
|
<listitem><para>
|
||||||
<listitem><para><link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link></para></listitem>
|
<link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link>
|
||||||
<listitem><para><link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link></para></listitem>
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link>
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>
|
||||||
|
<link linkend='var-BB_ORIGENV'><filename>BB_ORIGENV</filename></link>
|
||||||
|
</para></listitem>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
<link linkend='var-BITBAKE_UI'><filename>BITBAKE_UI</filename></link>
|
<link linkend='var-BITBAKE_UI'><filename>BITBAKE_UI</filename></link>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
You can find information on how to pass environment variables into the BitBake
|
The first four variables in this list relate to how BitBake treats shell
|
||||||
execution environment in the
|
environment variables during task execution.
|
||||||
"<link linkend='passing-information-into-the-build-task-environment'>Passing Information Into the Build Task Environment</link>" section.
|
By default, BitBake cleans the environment variables and provides tight
|
||||||
|
control over the shell execution environment.
|
||||||
|
However, through the use of these first four variables, you can
|
||||||
|
apply your control regarding the
|
||||||
|
environment variables allowed to be used by BitBake in the shell
|
||||||
|
during execution of tasks.
|
||||||
|
See the
|
||||||
|
"<link linkend='passing-information-into-the-build-task-environment'>Passing Information Into the Build Task Environment</link>"
|
||||||
|
section and the information about these variables in the
|
||||||
|
variable glossary for more information on how they work and
|
||||||
|
on how to use them.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -1107,10 +1107,18 @@
|
||||||
<title>Passing Information Into the Build Task Environment</title>
|
<title>Passing Information Into the Build Task Environment</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When running a task, BitBake tightly controls the execution
|
When running a task, BitBake tightly controls the shell execution
|
||||||
environment of the build tasks to make
|
environment of the build tasks to make
|
||||||
sure unwanted contamination from the build machine cannot
|
sure unwanted contamination from the build machine cannot
|
||||||
influence the build.
|
influence the build.
|
||||||
|
<note>
|
||||||
|
By default, BitBake cleans the environment to include only those
|
||||||
|
things exported or listed in its whitelist to ensure that the build
|
||||||
|
environment is reproducible and consistent.
|
||||||
|
You can prevent this "cleaning" by setting the
|
||||||
|
<link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link>
|
||||||
|
variable.
|
||||||
|
</note>
|
||||||
Consequently, if you do want something to get passed into the
|
Consequently, if you do want something to get passed into the
|
||||||
build task environment, you must take these two steps:
|
build task environment, you must take these two steps:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
|
@ -1118,14 +1126,16 @@
|
||||||
Tell BitBake to load what you want from the environment
|
Tell BitBake to load what you want from the environment
|
||||||
into the datastore.
|
into the datastore.
|
||||||
You can do so through the
|
You can do so through the
|
||||||
|
<link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link>
|
||||||
|
and
|
||||||
<link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link>
|
<link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link>
|
||||||
variable.
|
variables.
|
||||||
For example, assume you want to prevent the build system from
|
For example, assume you want to prevent the build system from
|
||||||
accessing your <filename>$HOME/.ccache</filename>
|
accessing your <filename>$HOME/.ccache</filename>
|
||||||
directory.
|
directory.
|
||||||
The following command tells BitBake to load
|
The following command "whitelists" the environment variable
|
||||||
<filename>CCACHE_DIR</filename> from the environment into
|
<filename>CCACHE_DIR</filename> causing BitBack to allow that
|
||||||
the datastore:
|
variable into the datastore:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
|
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
|
@ -1174,12 +1184,6 @@
|
||||||
The previous example returns <filename>BAR</filename> from the original
|
The previous example returns <filename>BAR</filename> from the original
|
||||||
execution environment.
|
execution environment.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
By default, BitBake cleans the environment to include only those
|
|
||||||
things exported or listed in its whitelist to ensure that the build
|
|
||||||
environment is reproducible and consistent.
|
|
||||||
</para>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue