Bug 5571

Summary: Re-validate checksums in do_unpack
Product: [Build System, Metadata & Runtime] BitBake Reporter: Ross Burton <ross.burton>
Component: bitbakeAssignee: Alejandro Hernandez <alejandro.hernandez>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: alejandro.hernandez, clemens.lang, poky.bs.watcher, poky.watcher, sgw, yi.zhao
Version: 1.4   
Target Milestone: 1.8   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2013-11-20 09:39:08 UTC
If I have a recipe with correct checksums in, fetch the tarballs, and then change the checksums (either deliberately or accidentally) subsequent rebuilds of that recipe won't re-validate the tarballs.  This can result in recipes being submitted that don't actually build.

I think that do_extract() should also verify checksums, ideally with a fast-path for the common case where the metadata doesn't change between do_fetch and do_extract.
Comment 1 Richard Purdie 2013-11-20 14:28:00 UTC
Its fetcher design that checksums get checked after the file is downloaded. If the file is already present with the "done" stamp, its assumed the checksums were checked and are right.

Checksumming the files at do_unpack adds significant overhead unfortunately.
Comment 2 Richard Purdie 2013-11-20 14:36:39 UTC
Thinking a bit further there is a half way house on this. We should write the checksum into the .done file and where we already have an existing file, we can just verify the checksum in the file matches. This would prevent the common case of errors.
Comment 3 Ross Burton 2014-09-22 16:19:22 UTC
A post to yocto@ spoke about a related problem: disk corruption.  I'm not convinced we should cater for failing disks as the problems won't be restricted to the source cache, but everything that gets written to disk.
Comment 4 Paul Eggleton 2014-11-04 09:44:08 UTC
*** Bug 6923 has been marked as a duplicate of this bug. ***