[bitbake-devel] [PATCH 2/2] bitbake: implement checksums for local files in SRC_URI

Richard Purdie richard.purdie at linuxfoundation.org
Wed May 23 09:42:07 UTC 2012


On Wed, 2012-05-23 at 00:55 +0100, Paul Eggleton wrote:
> On Wednesday 23 May 2012 00:50:48 Paul Eggleton wrote:
> > On Tuesday 22 May 2012 18:45:23 you wrote:
> > > On 5/22/12 6:23 PM, Paul Eggleton wrote:
> > > > 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.
> > > 
> > > Does the mtime change invalidate the checksum, or just cause the checksum
> > > to be re-interpreted?
> > 
> > The latter.
> 
> Er, I think I may have misread your question. To be totally clear - the mtime 
> is not a component of the checksum; we merely store it next to the checksum in 
> a cache so that we don't have to re-compute the checksum if the file hasn't 
> been modified. If mtime changes but the file content does not, the checksum will 
> be re-computed but will not change.

Just to be completely clear, this is purely a performance issue, we
don't want to recompute the checksums for all the files at each bitbake
invocation as his would be slow. We therefore just recompute the
checksum when mtime changes.

You can therefore happily touch a file and it won't trigger a rebuild.
Any change to the contents will rebuild the recipe though through the
changed sstate checksum.

Cheers,

Richard





More information about the bitbake-devel mailing list