From c7d27875880bd5b33efbec55947ac9e1c66b3d0e Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Wed, 14 Dec 2011 15:36:47 -0800 Subject: documentation/poky-ref-manual/ref-bitbake.xml: Updated BitBake Running a Task I added more information about how BitBake actually runs a task. The information has to do with how tightly BB controls the execution environment of the build tasks to prevent contamination from the build machine from leaking into the task execution environment. This tight control actually causes some unexpected behavior during builds. For example, when a user exports and BB_ENV_EXTRAWHITE an environment item such as CCACHE_DIR, the effects of the environment item never make it to the BB task execution environment. They only make it to the data store. The user actually has to take some extra steps to export that environment item into the task execution environment. The added information I put into the "Running a Task" section describes these extra steps. Fixes [YOCTO #689] Reported-by: Wolfgang Denk (From yocto-docs rev: 182aa61693c2c7de8331569c30cbb8f41dad2315) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/poky-ref-manual/ref-bitbake.xml | 44 ++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'documentation') diff --git a/documentation/poky-ref-manual/ref-bitbake.xml b/documentation/poky-ref-manual/ref-bitbake.xml index 16c5137a50..6b058008fc 100644 --- a/documentation/poky-ref-manual/ref-bitbake.xml +++ b/documentation/poky-ref-manual/ref-bitbake.xml @@ -260,8 +260,50 @@ Once all the tasks have been completed BitBake exits. - + + When running a task, BitBake tightly controls the execution environment + of the build tasks to make sure unwanted contamination from the build machine + cannot influence the build. + Consequently, if you do want something to get passed into the build + task's environment, you must take a few steps: + + Tell BitBake to load what you want from the environment + into the data store. + You can do so through the BB_ENV_WHITELIST + variable. + 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 data + store: + + export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR" + + Tell BitBake to export what you have loaded into the + environment store to the task environment of every running task. + Loading something from the environment into the data store + (previous step) only makes it available in the datastore. + To export it to the task environment of every running task, + use a command similar to the following in your + local.conf or distro configuration file: + + export CCACHE_DIR + + + + + + A side effect of the previous steps is that BitBake records the variable + as a dependency of the build process in things like the shared state + checksums. + If doing so results in unnecessary rebuilds of tasks, you can whitelist the + variable so that the shared state code ignores the dependency when it creates + checksums. + For information on this process, see the BB_HASHBASE_WHITELIST + example in Checksums (Signatures). + +
BitBake Command Line -- cgit v1.2.3-54-g00ecf