Patchwork [2/2] bitbake.conf: add BUILDNAME to BB_HASHBASE_WHITELIST

login
register
mail settings
Submitter Robert Yang
Date Oct. 23, 2012, 7:52 a.m.
Message ID <7ed4d03d62b0fe0e05bb974122e544ae02f7354e.1350957811.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/38445/
State New
Headers show

Comments

Robert Yang - Oct. 23, 2012, 7:52 a.m.
There is an error when "bitbake -S <image>", e.g., core-image-minimal:

NOTE: Reparsing files to collect dependency data
ERROR: Bitbake's cached basehash does not match the one we just generated (/path/to/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)!
ERROR: The mismatched hashes were 730202c9538c4fc1f2e3d1fefa3595f0 and a91bb9451c182e19bfe405ac1bafcc0f

The mismatch can be caused by 2 reasons:

1) BUILDNAME, there is no member of BUILDNAME in the cache when first
   parsing the recipes, it is added by the BBCooker::buildSetVars before
   start the building, so there would be mismatches when compare the
   re-parsed basehash (contains BUILDNAME) to the previous one (no
   BUILDNAME) which is from the cache.

   Add the BUILDNAME to BB_HASHBASE_WHITELIST would fix the problem.

2) DATE or TIME, they are in the cache data and will change when
   re-parsing, move them from BB_HASHCONFIG_WHITELIST to
   BB_HASHBASE_WHITELIST which can be ingored by basehash would fix the
   problem.

   Another fix for DATE or TIME is not to let them expand immediately,
   change: (":=" to "=")
   DATE := "${@time.strftime('%Y%m%d',time.gmtime())}"
   TIME := "${@time.strftime('%H%M%S',time.gmtime())}"

   To:

   DATE = "${@time.strftime('%Y%m%d',time.gmtime())}"
   TIME = "${@time.strftime('%H%M%S',time.gmtime())}"

[YOCTO #3299]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/conf/bitbake.conf |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 65efbb9..41c27eb 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -774,8 +774,8 @@  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 CCACHE_DISABLE"
-BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER \
+    CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE DATE TIME BUILDNAME"
+BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} SESSION_MANAGER \
     DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK \
     XAUTHORITY PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \
     PARALLEL_MAKE BB_NUMBER_THREADS"