diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-18 11:32:04 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-20 11:48:38 +0100 |
| commit | d485d0b0e875c9f5161645647472ce72af8d322e (patch) | |
| tree | 511c662104813c268361f808de5e13756b0574ed /bitbake/lib/bb/cache.py | |
| parent | a4fd77db84c86b6953ddf48acb0dbba7508a2ac4 (diff) | |
| download | poky-d485d0b0e875c9f5161645647472ce72af8d322e.tar.gz | |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
| -rw-r--r-- | bitbake/lib/bb/cache.py | 8 |
1 files changed, 7 insertions, 1 deletions
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: | |||
| 43 | logger.info("Importing cPickle failed. " | 43 | logger.info("Importing cPickle failed. " |
| 44 | "Falling back to a very slow implementation.") | 44 | "Falling back to a very slow implementation.") |
| 45 | 45 | ||
| 46 | __cache_version__ = "144" | 46 | __cache_version__ = "145" |
| 47 | 47 | ||
| 48 | def getCacheFile(path, filename, data_hash): | 48 | def getCacheFile(path, filename, data_hash): |
| 49 | return os.path.join(path, filename + "." + data_hash) | 49 | return os.path.join(path, filename + "." + data_hash) |
| @@ -130,7 +130,9 @@ class CoreRecipeInfo(RecipeInfoCommon): | |||
| 130 | self.broken = self.getvar('BROKEN', metadata) | 130 | self.broken = self.getvar('BROKEN', metadata) |
| 131 | self.not_world = self.getvar('EXCLUDE_FROM_WORLD', metadata) | 131 | self.not_world = self.getvar('EXCLUDE_FROM_WORLD', metadata) |
| 132 | self.stamp = self.getvar('STAMP', metadata) | 132 | self.stamp = self.getvar('STAMP', metadata) |
| 133 | self.stampclean = self.getvar('STAMPCLEAN', metadata) | ||
| 133 | self.stamp_base = self.flaglist('stamp-base', self.tasks, metadata) | 134 | self.stamp_base = self.flaglist('stamp-base', self.tasks, metadata) |
| 135 | self.stamp_base_clean = self.flaglist('stamp-base-clean', self.tasks, metadata) | ||
| 134 | self.stamp_extrainfo = self.flaglist('stamp-extra-info', self.tasks, metadata) | 136 | self.stamp_extrainfo = self.flaglist('stamp-extra-info', self.tasks, metadata) |
| 135 | self.file_checksums = self.flaglist('file-checksums', self.tasks, metadata, True) | 137 | self.file_checksums = self.flaglist('file-checksums', self.tasks, metadata, True) |
| 136 | self.packages_dynamic = self.listvar('PACKAGES_DYNAMIC', metadata) | 138 | self.packages_dynamic = self.listvar('PACKAGES_DYNAMIC', metadata) |
| @@ -157,7 +159,9 @@ class CoreRecipeInfo(RecipeInfoCommon): | |||
| 157 | cachedata.pkg_dp = {} | 159 | cachedata.pkg_dp = {} |
| 158 | 160 | ||
| 159 | cachedata.stamp = {} | 161 | cachedata.stamp = {} |
| 162 | cachedata.stampclean = {} | ||
| 160 | cachedata.stamp_base = {} | 163 | cachedata.stamp_base = {} |
| 164 | cachedata.stamp_base_clean = {} | ||
| 161 | cachedata.stamp_extrainfo = {} | 165 | cachedata.stamp_extrainfo = {} |
| 162 | cachedata.file_checksums = {} | 166 | cachedata.file_checksums = {} |
| 163 | cachedata.fn_provides = {} | 167 | cachedata.fn_provides = {} |
| @@ -189,7 +193,9 @@ class CoreRecipeInfo(RecipeInfoCommon): | |||
| 189 | cachedata.pkg_pepvpr[fn] = (self.pe, self.pv, self.pr) | 193 | cachedata.pkg_pepvpr[fn] = (self.pe, self.pv, self.pr) |
| 190 | cachedata.pkg_dp[fn] = self.defaultpref | 194 | cachedata.pkg_dp[fn] = self.defaultpref |
| 191 | cachedata.stamp[fn] = self.stamp | 195 | cachedata.stamp[fn] = self.stamp |
| 196 | cachedata.stampclean[fn] = self.stampclean | ||
| 192 | cachedata.stamp_base[fn] = self.stamp_base | 197 | cachedata.stamp_base[fn] = self.stamp_base |
| 198 | cachedata.stamp_base_clean[fn] = self.stamp_base_clean | ||
| 193 | cachedata.stamp_extrainfo[fn] = self.stamp_extrainfo | 199 | cachedata.stamp_extrainfo[fn] = self.stamp_extrainfo |
| 194 | cachedata.file_checksums[fn] = self.file_checksums | 200 | cachedata.file_checksums[fn] = self.file_checksums |
| 195 | 201 | ||
