From patchwork Sat Feb 25 06:56:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel] cache broken in master Date: Sat, 25 Feb 2012 06:56:46 -0000 From: Dongxiao Xu X-Patchwork-Id: 22039 Message-Id: <1330153006.1957.10.camel@dongxiao-osel> To: Andreas Oberritter Cc: bitbake-devel@lists.openembedded.org On Sat, 2012-02-25 at 00:47 +0100, Andreas Oberritter wrote: > Hi, > > commit 1c1df03a6c4717bfd5faab144c4f8bbfcbae0b57 broke bitbake's > dependency cache for me, i.e. it parses all recipes on every invocation > and always displays "(0 cached, 1269 parsed)". Deleting tmp/cache didn't > help. Reverting this commit restores the functionality. Hi Andreas, Sorry for the inconvenience that this commit brought to you. Could you help to try the following and send me your "/tmp/1.log and /tmp/2.log"? 1) apply the attached "cache_debug.patch" 2) remove tmp/cache 3) bitbake -p &> /tmp/1.log 4) bitbake -p &> /tmp/2.log Besides, you can have a try of the attached cache_whitelist.patch to see if it fixes your problem. Thanks, Dongxiao > > Regards, > Andreas diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 24c7a8f..dbf2002 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -463,20 +463,12 @@ class DataSmart(MutableMapping): def get_hash(self): data = "" - keys = iter(self) + basewhitelist = set((self.getVar("BB_HASHBASE_WHITELIST", True) or "").split()) + keys = set(key for key in iter(self) if not key.startswith("__")) for key in keys: - if key in ["TIME", "DATE"]: + if key in basewhitelist: continue - if key == "__depends": - deps = list(self.getVar(key, False)) - deps.sort() - value = [deps[i][0] for i in range(len(deps))] - elif key == "PATH": - path = list(set(self.getVar(key, False).split(':'))) - path.sort() - value = " ".join(path) - else: - value = self.getVar(key, False) or "" + value = self.getVar(key, False) or "" data = data + key + ': ' + str(value) + '\n' return hashlib.md5(data).hexdigest() diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 90e5f7a..133a957 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -727,7 +727,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" +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 DATE TIME" MLPREFIX ??= "" MULTILIB_VARIANTS ??= ""