diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-08 21:25:23 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-11 17:36:50 +0000 |
commit | 384863c7bc4d36d584537b00f1469b68eb94b487 (patch) | |
tree | b676e8d24bec625a16bf0df8374f05fa177bf401 /bitbake/lib/bb/siggen.py | |
parent | 0e65f0958034c4af2c5d4404bd997eb18121f296 (diff) | |
download | poky-384863c7bc4d36d584537b00f1469b68eb94b487.tar.gz |
bitbake: cache/fetch2/siggen: Ensure we track include history for file checksums
Currently, if you reference a file url, its checksum is included in the
task hash, however if you change to a different file at a different
location, perhaps taking advantage of the FILESPATH functionality, the
system will not reparse the file in question and change its checksum to
match the new file.
To correctly handle this, the system not only needs to know if the
existing file still exists or not, but also check the existance
of every file it would have looked at when computing the original file.
We already do this in the bitbake parsing code for class inclusion. This
change uses the same technique to log the file list we looked at and
if files in these locations exist when they previously did not, to
invalidate and reparse the file.
Since data stored in the cache is flattened text, we have to use a string
form of the data and split on the ":" character which is ugly, but is
an internal detail we can improve later if a better method is found.
The cache version changes to trigger a reparse since the previous
cache data is now incompatible.
[YOCTO #7019]
(Bitbake rev: 67ebf368aab8fbe372374190f013bdf2c83c59de)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 0927321427..e77be6abfb 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -192,7 +192,8 @@ class SignatureGeneratorBasic(SignatureGenerator): | |||
192 | checksums = bb.fetch2.get_file_checksums(dataCache.file_checksums[fn][task], recipename) | 192 | checksums = bb.fetch2.get_file_checksums(dataCache.file_checksums[fn][task], recipename) |
193 | for (f,cs) in checksums: | 193 | for (f,cs) in checksums: |
194 | self.file_checksum_values[k][f] = cs | 194 | self.file_checksum_values[k][f] = cs |
195 | data = data + cs | 195 | if cs: |
196 | data = data + cs | ||
196 | 197 | ||
197 | taint = self.read_taint(fn, task, dataCache.stamp[fn]) | 198 | taint = self.read_taint(fn, task, dataCache.stamp[fn]) |
198 | if taint: | 199 | if taint: |