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/bitbake-user-manual-metadata.xml | |
parent | f11de9d205961088d31f9893fd6c140b443a5841 (diff) | |
download | poky-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/bitbake-user-manual-metadata.xml')
-rw-r--r-- | bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 26 |
1 files changed, 15 insertions, 11 deletions
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 @@ | |||
1107 | <title>Passing Information Into the Build Task Environment</title> | 1107 | <title>Passing Information Into the Build Task Environment</title> |
1108 | 1108 | ||
1109 | <para> | 1109 | <para> |
1110 | When running a task, BitBake tightly controls the execution | 1110 | When running a task, BitBake tightly controls the shell execution |
1111 | environment of the build tasks to make | 1111 | environment of the build tasks to make |
1112 | sure unwanted contamination from the build machine cannot | 1112 | sure unwanted contamination from the build machine cannot |
1113 | influence the build. | 1113 | influence the build. |
1114 | <note> | ||
1115 | By default, BitBake cleans the environment to include only those | ||
1116 | things exported or listed in its whitelist to ensure that the build | ||
1117 | environment is reproducible and consistent. | ||
1118 | You can prevent this "cleaning" by setting the | ||
1119 | <link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link> | ||
1120 | variable. | ||
1121 | </note> | ||
1114 | Consequently, if you do want something to get passed into the | 1122 | Consequently, if you do want something to get passed into the |
1115 | build task environment, you must take these two steps: | 1123 | build task environment, you must take these two steps: |
1116 | <orderedlist> | 1124 | <orderedlist> |
@@ -1118,14 +1126,16 @@ | |||
1118 | Tell BitBake to load what you want from the environment | 1126 | Tell BitBake to load what you want from the environment |
1119 | into the datastore. | 1127 | into the datastore. |
1120 | You can do so through the | 1128 | You can do so through the |
1129 | <link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link> | ||
1130 | and | ||
1121 | <link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link> | 1131 | <link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link> |
1122 | variable. | 1132 | variables. |
1123 | For example, assume you want to prevent the build system from | 1133 | For example, assume you want to prevent the build system from |
1124 | accessing your <filename>$HOME/.ccache</filename> | 1134 | accessing your <filename>$HOME/.ccache</filename> |
1125 | directory. | 1135 | directory. |
1126 | The following command tells BitBake to load | 1136 | The following command "whitelists" the environment variable |
1127 | <filename>CCACHE_DIR</filename> from the environment into | 1137 | <filename>CCACHE_DIR</filename> causing BitBack to allow that |
1128 | the datastore: | 1138 | variable into the datastore: |
1129 | <literallayout class='monospaced'> | 1139 | <literallayout class='monospaced'> |
1130 | export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR" | 1140 | export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR" |
1131 | </literallayout></para></listitem> | 1141 | </literallayout></para></listitem> |
@@ -1174,12 +1184,6 @@ | |||
1174 | The previous example returns <filename>BAR</filename> from the original | 1184 | The previous example returns <filename>BAR</filename> from the original |
1175 | execution environment. | 1185 | execution environment. |
1176 | </para> | 1186 | </para> |
1177 | |||
1178 | <para> | ||
1179 | By default, BitBake cleans the environment to include only those | ||
1180 | things exported or listed in its whitelist to ensure that the build | ||
1181 | environment is reproducible and consistent. | ||
1182 | </para> | ||
1183 | </section> | 1187 | </section> |
1184 | </section> | 1188 | </section> |
1185 | 1189 | ||