summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2016-02-23 08:11:27 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-03 17:34:14 +0000
commitda22add33b8f44ff3019ee9edd7a520b54769c27 (patch)
treedc45df7089040cb1413079656172c92fdbed62b2 /bitbake
parentf11de9d205961088d31f9893fd6c140b443a5841 (diff)
downloadpoky-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')
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml37
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml26
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 @@
42 <literallayout class='monospaced'> 42 <literallayout class='monospaced'>
43 $ grep processor /proc/cpuinfo 43 $ grep processor /proc/cpuinfo
44 </literallayout> 44 </literallayout>
45 This command returns the number of processors, which takes into 45 This command returns the number of processors, which takes into
46 account hyper-threading. 46 account hyper-threading.
47 Thus, a quad-core build host with hyper-threading most likely 47 Thus, a quad-core build host with hyper-threading most likely
48 shows eight processors, which is the value you would then assign to 48 shows eight processors, which is the value you would then assign to
49 <filename>BB_NUMBER_THREADS</filename>. 49 <filename>BB_NUMBER_THREADS</filename>.
50 </para> 50 </para>
@@ -116,16 +116,35 @@
116 Prior to parsing configuration files, Bitbake looks 116 Prior to parsing configuration files, Bitbake looks
117 at certain variables, including: 117 at certain variables, including:
118 <itemizedlist> 118 <itemizedlist>
119 <listitem><para><link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link></para></listitem> 119 <listitem><para>
120 <listitem><para><link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link></para></listitem> 120 <link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link>
121 <listitem><para><link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link></para></listitem> 121 </para></listitem>
122 <listitem><para>
123 <link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link>
124 </para></listitem>
125 <listitem><para>
126 <link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link>
127 </para></listitem>
128 <listitem><para>
129 <link linkend='var-BB_ORIGENV'><filename>BB_ORIGENV</filename></link>
130 </para></listitem>
122 <listitem><para> 131 <listitem><para>
123 <link linkend='var-BITBAKE_UI'><filename>BITBAKE_UI</filename></link> 132 <link linkend='var-BITBAKE_UI'><filename>BITBAKE_UI</filename></link>
124 </para></listitem> 133 </para></listitem>
125 </itemizedlist> 134 </itemizedlist>
126 You can find information on how to pass environment variables into the BitBake 135 The first four variables in this list relate to how BitBake treats shell
127 execution environment in the 136 environment variables during task execution.
128 "<link linkend='passing-information-into-the-build-task-environment'>Passing Information Into the Build Task Environment</link>" section. 137 By default, BitBake cleans the environment variables and provides tight
138 control over the shell execution environment.
139 However, through the use of these first four variables, you can
140 apply your control regarding the
141 environment variables allowed to be used by BitBake in the shell
142 during execution of tasks.
143 See the
144 "<link linkend='passing-information-into-the-build-task-environment'>Passing Information Into the Build Task Environment</link>"
145 section and the information about these variables in the
146 variable glossary for more information on how they work and
147 on how to use them.
129 </para> 148 </para>
130 149
131 <para> 150 <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 @@
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