bitbake: cache/fetch2/siggen: Ensure we track include history for file checksums
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Dec 2014 21:25:23 +0000 (21:25 +0000)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 26 Jul 2015 13:13:54 +0000 (10:13 -0300)
commitd6ef4cf0c355845a275f2c7930645ba42a845322
tree79a220aac7e90f85106173fe92b518529cac7454
parenta7cd34dd75c50d5b9b74da1bd9e2e28767da7f6d
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
bitbake/lib/bb/cache.py
bitbake/lib/bb/fetch2/__init__.py
bitbake/lib/bb/siggen.py