From d485d0b0e875c9f5161645647472ce72af8d322e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 18 Sep 2012 11:32:04 +0100 Subject: bitbake: build/siggen: Add support for stamp 'clean' masks Currently when we execute a task, we don't remove other potentially stale stamps. This can mean if you switch between two different versions of a recipe without a clean, the build can get very confused. This patch adds in functionality to allow a wildcard expression of stamp files to be removed when creating a new stamp file. This patch adds in the core of the code to enable this but it also requires metadata support to enable it. When writing this improvement I went through several different options but this was the only way I could find to allow things like noexec tasks to function correctly (where stamps need to be created without the data store). [YOCTO #2961] (Bitbake rev: e026469b307522e5b6a680e0ae5587749d33dcae) Signed-off-by: Richard Purdie --- bitbake/lib/bb/cache.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/cache.py') diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index dea2a80616..619b9eec24 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -43,7 +43,7 @@ except ImportError: logger.info("Importing cPickle failed. " "Falling back to a very slow implementation.") -__cache_version__ = "144" +__cache_version__ = "145" def getCacheFile(path, filename, data_hash): return os.path.join(path, filename + "." + data_hash) @@ -130,7 +130,9 @@ class CoreRecipeInfo(RecipeInfoCommon): self.broken = self.getvar('BROKEN', metadata) self.not_world = self.getvar('EXCLUDE_FROM_WORLD', metadata) self.stamp = self.getvar('STAMP', metadata) + self.stampclean = self.getvar('STAMPCLEAN', metadata) self.stamp_base = self.flaglist('stamp-base', self.tasks, metadata) + self.stamp_base_clean = self.flaglist('stamp-base-clean', self.tasks, metadata) self.stamp_extrainfo = self.flaglist('stamp-extra-info', self.tasks, metadata) self.file_checksums = self.flaglist('file-checksums', self.tasks, metadata, True) self.packages_dynamic = self.listvar('PACKAGES_DYNAMIC', metadata) @@ -157,7 +159,9 @@ class CoreRecipeInfo(RecipeInfoCommon): cachedata.pkg_dp = {} cachedata.stamp = {} + cachedata.stampclean = {} cachedata.stamp_base = {} + cachedata.stamp_base_clean = {} cachedata.stamp_extrainfo = {} cachedata.file_checksums = {} cachedata.fn_provides = {} @@ -189,7 +193,9 @@ class CoreRecipeInfo(RecipeInfoCommon): cachedata.pkg_pepvpr[fn] = (self.pe, self.pv, self.pr) cachedata.pkg_dp[fn] = self.defaultpref cachedata.stamp[fn] = self.stamp + cachedata.stampclean[fn] = self.stampclean cachedata.stamp_base[fn] = self.stamp_base + cachedata.stamp_base_clean[fn] = self.stamp_base_clean cachedata.stamp_extrainfo[fn] = self.stamp_extrainfo cachedata.file_checksums[fn] = self.file_checksums -- cgit v1.2.3-54-g00ecf