bitbake: implement checksums for local files in SRC_URI
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 22 May 2012 23:23:32 +0000 (00:23 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 May 2012 10:35:04 +0000 (11:35 +0100)
commit96c9d2319733880bac6611ed0e6d3aea6f7cdce6
tree413322fbd1da9e728af97c3a9fe0347dcd880a52
parent89d0c7cad297dd09c188d59209e0bae554189074
bitbake: implement checksums for local files in SRC_URI

Gathers a list of paths to have checksums calculated at parse time, and
processes these when calculating task hashes. Checksums are cached with
the file's current mtime. Thus, changing any local file in SRC_URI will
now cause the do_fetch taskhash to change, thus forcing a rebuild.

This change adds very roughly about an 8% increase in parse time (a few
seconds) and maybe a few seconds during runqueue generation, so a fairly
moderate performance hit.

Note that since paths are resolved at parse time, this will not force
a rebuild when files are introduced which would cause that resolved path
to be different - for example, where a machine-specific version of a file
was added without otherwise changing the recipe. This will need to be
handled in a future update.

Code to hook this into the signature generator was courtesy of
Richard Purdie <richard.purdie@linuxfoundation.org>.

Implements [YOCTO #2044].

(Bitbake rev: c993b7c457f8b7776e8a5dff253bfa0724bc2cae)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/cache.py
bitbake/lib/bb/checksum.py [new file with mode: 0644]
bitbake/lib/bb/cooker.py
bitbake/lib/bb/fetch2/__init__.py
bitbake/lib/bb/siggen.py