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 @@ $ grep processor /proc/cpuinfo - 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 BB_NUMBER_THREADS. @@ -116,16 +116,35 @@ Prior to parsing configuration files, Bitbake looks at certain variables, including: - BB_ENV_WHITELIST - BB_PRESERVE_ENV - BB_ENV_EXTRAWHITE + + BB_ENV_WHITELIST + + + BB_ENV_EXTRAWHITE + + + BB_PRESERVE_ENV + + + BB_ORIGENV + BITBAKE_UI - You can find information on how to pass environment variables into the BitBake - execution environment in the - "Passing Information Into the Build Task Environment" 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 + "Passing Information Into the Build Task Environment" + section and the information about these variables in the + variable glossary for more information on how they work and + on how to use them. 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 @@ Passing Information Into the Build Task Environment - 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. + + 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 + BB_PRESERVE_ENV + variable. + Consequently, if you do want something to get passed into the build task environment, you must take these two steps: @@ -1118,14 +1126,16 @@ Tell BitBake to load what you want from the environment into the datastore. You can do so through the + BB_ENV_WHITELIST + and BB_ENV_EXTRAWHITE - variable. + variables. For example, assume you want to prevent the build system from accessing your $HOME/.ccache directory. - The following command tells BitBake to load - CCACHE_DIR from the environment into - the datastore: + The following command "whitelists" the environment variable + CCACHE_DIR causing BitBack to allow that + variable into the datastore: export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR" @@ -1174,12 +1184,6 @@ The previous example returns BAR from the original execution environment. - - - 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. -