Skip to contentSkip to conversation

conf/bitbake.conf: fix reparsing after -p is used

PATCH Applied Paul Eggleton 2 participants 2 messages Jun 18, 2012 – Jun 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 conf/bitbake.conf: fix reparsing after -p is used

The bitbake wrapper script is set up such that the -p (--parse-only) command line option is not executed under pseudo, and it sets the PSEUDO_BUILD variable to indicate whether or not pseudo is being used. Since PSEUDO_BUILD is allowed through into the environment via BB_ENV_EXTRAWHITE it influences the data hash and thus if you run "bitbake -p" and then run bitbake again to actually build something, the change to PSEUDO_BUILD causes the cache from the -p execution not to be used. This is fixed simply by adding PSEUDO_BUILD to BB_HASHCONFIG_WHITELIST in bitbake.conf so that it doesn't influence the data hash.

Fixes [YOCTO #2600].

---
 meta/conf/bitbake.conf |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
index 97930a7..12598f4 100644
@@ -746,7 +746,7 @@ BB_CONSOLELOG ?= "${TMPDIR}/cooker.log.${DATETIME}"
 # Setup our default hash policy
 BB_SIGNATURE_HANDLER ?= "OEBasic"
 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE"
-BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY"
+BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY PSEUDO_BUILD"
 BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc defaultval _append _prepend deps depends lockfiles type vardepsexclude \
                                vardeps vardepvalue file-checksums python func task export unexport noexec \
                                nostamp dirs cleandirs sstate-lockfile-shared prefuncs postfuncs export_func \
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 23 lines · Paul Eggleton

The bitbake wrapper script is set up such that the -p (--parse-only) command line option is not executed under pseudo, and it sets the PSEUDO_BUILD variable to indicate whether or not pseudo is being used. Since PSEUDO_BUILD is allowed through into the environment via BB_ENV_EXTRAWHITE it influences the data hash and thus if you run "bitbake -p" and then run bitbake again to actually build something, the change to PSEUDO_BUILD causes the cache from the -p execution not to be used. This is fixed simply by adding PSEUDO_BUILD to BB_HASHCONFIG_WHITELIST in bitbake.conf so that it doesn't influence the data hash.

Fixes [YOCTO #2600].

---
  meta/conf/bitbake.conf |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +0 -0
index 97930a7..12598f4 100644

meta/conf/bitbake.conf BB_CONSOLELOG ?= "${TMPDIR}/cooker.log.${DATETIME}" · line 752

Quoted 8 lines
meta/conf/bitbake.conf +1 -1
@@ -746,7 +746,7 @@ BB_CONSOLELOG ?= "${TMPDIR}/cooker.log.${DATETIME}"
  # Setup our default hash policy
  BB_SIGNATURE_HANDLER ?= "OEBasic"
  BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE"
-BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY"
+BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY PSEUDO_BUILD"
  BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc defaultval _append _prepend deps depends lockfiles type vardepsexclude \
                                 vardeps vardepvalue file-checksums python func task export unexport noexec \
                                 nostamp dirs cleandirs sstate-lockfile-shared prefuncs postfuncs export_func \

Merged into OE-Core

Thanks
Sau!