]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake-user-manual: Enhance environment variable discussion.
authorScott Rifenbark <srifenbark@gmail.com>
Tue, 23 Feb 2016 16:11:27 +0000 (08:11 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Mar 2016 17:33:59 +0000 (17:33 +0000)
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.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
doc/bitbake-user-manual/bitbake-user-manual-execution.xml
doc/bitbake-user-manual/bitbake-user-manual-metadata.xml

index fa52e29898f6cd304ec47d541ed15e7f850fe86f..b1b72e0aaec413eb603309a06a66eade9993794f 100644 (file)
@@ -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>
             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>
index 61daadea925a9384a7a4acf2eb5116e829655c7e..cfa85b379a97a7c99b162abf4dd466f0eb49b77c 100644 (file)
             <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>
                         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>
                 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>