diff options
author | Scott Rifenbark <srifenbark@gmail.com> | 2016-02-23 08:11:27 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-03 17:34:14 +0000 |
commit | da22add33b8f44ff3019ee9edd7a520b54769c27 (patch) | |
tree | dc45df7089040cb1413079656172c92fdbed62b2 /bitbake/doc/bitbake-user-manual | |
parent | f11de9d205961088d31f9893fd6c140b443a5841 (diff) | |
download | openembedded-core-contrib-da22add33b8f44ff3019ee9edd7a520b54769c27.tar.gz |
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>
Diffstat (limited to 'bitbake/doc/bitbake-user-manual')
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml | 37 | ||||
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 26 |
2 files changed, 43 insertions, 20 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml index fa52e29898..b1b72e0aae 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml @@ -42,9 +42,9 @@ <literallayout class='monospaced'> $ grep processor /proc/cpuinfo </literallayout> - This command returns the number of processors, which takes into - account hyper-threading. - Thus, a quad-core build host with hyper-threading most likely + This command returns the number of processors, which takes into + account hyper-threading. + Thus, a quad-core build host with hyper-threading most likely shows eight processors, which is the value you would then assign to <filename>BB_NUMBER_THREADS</filename>. </para> @@ -116,16 +116,35 @@ Prior to parsing configuration files, Bitbake looks at certain variables, including: <itemizedlist> - <listitem><para><link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</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_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link></para></listitem> + <listitem><para> + <link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link> + </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> <link linkend='var-BITBAKE_UI'><filename>BITBAKE_UI</filename></link> </para></listitem> </itemizedlist> - You can find information on how to pass environment variables into the BitBake - execution environment in the - "<link linkend='passing-information-into-the-build-task-environment'>Passing Information Into the Build Task Environment</link>" section. + The first four variables in this list relate to how BitBake treats shell + environment variables during task execution. + 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> diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index 61daadea92..cfa85b379a 100644 --- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml @@ -1107,10 +1107,18 @@ <title>Passing Information Into the Build Task Environment</title> <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 sure unwanted contamination from the build machine cannot 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 build task environment, you must take these two steps: <orderedlist> @@ -1118,14 +1126,16 @@ Tell BitBake to load what you want from the environment into the datastore. 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> - variable. + variables. For example, assume you want to prevent the build system from accessing your <filename>$HOME/.ccache</filename> directory. - The following command tells BitBake to load - <filename>CCACHE_DIR</filename> from the environment into - the datastore: + The following command "whitelists" the environment variable + <filename>CCACHE_DIR</filename> causing BitBack to allow that + variable into the datastore: <literallayout class='monospaced'> export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR" </literallayout></para></listitem> @@ -1174,12 +1184,6 @@ The previous example returns <filename>BAR</filename> from the original execution environment. </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> |