[bitbake-devel] [PATCH] bitbake: reset mtime cache before the build
Ed Bartosh
ed.bartosh at linux.intel.com
Sun Apr 19 22:03:42 UTC 2015
Mtime cache is desinged with assumption that files are not
removed. Unfortunately it's not always the case for memory-resident
bitbake as build/tmp can be removed to perform build from scratch.
In this case bitbake crashes when trying to create timestamps if
tmp/stamps/ hierarchy doesn't exist.
Resetting mtime cache should solve this issue.
[YOCTO: #7562]
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
bitbake/lib/bb/cooker.py | 1 +
bitbake/lib/bb/parse/__init__.py | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 9c101f2..383bd12 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1343,6 +1343,7 @@ class BBCooker:
return True
return retval
+ parse.reset_cache()
self.buildSetVars()
taskdata, runlist, fulltargetlist = self.buildTaskData(targets, task, self.configuration.abort)
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py
index 25effc2..c0867d4 100644
--- a/bitbake/lib/bb/parse/__init__.py
+++ b/bitbake/lib/bb/parse/__init__.py
@@ -78,6 +78,10 @@ def update_cache(f):
logger.debug(1, "Updating mtime cache for %s" % f)
update_mtime(f)
+def reset_cache():
+ global __mtime_cache
+ __mtime_cache = {}
+
def mark_dependency(d, f):
if f.startswith('./'):
f = "%s/%s" % (os.getcwd(), f[2:])
--
2.1.4
More information about the bitbake-devel
mailing list