| Summary: | sstate needs a mechanism to detect changes to local files | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Paul Eggleton <bluelightning> |
| Component: | bitbake | Assignee: | Paul Eggleton <bluelightning> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | mark.hatle, poky.bs.watcher, poky.watcher, richard.purdie, sgw, song.liu, Xiaofeng.yan |
| Version: | unspecified | ||
| Target Milestone: | 1.3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | (P1) Implemented | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
|
Description
Paul Eggleton
2012-03-01 15:42:35 UTC
I am interest in enhancing this feature. I want to implement this function in 1.3. We can split this tsak into a few logical changes that are needed. Firstly, we need a new bitbake module which maintains a list of files, their checksums and their mtimes. Users of the API will be able to request the checksum, if the mtime matches, it gets returned, if it doesn't we need to checksum the file first. We need to persist this cache. The initial user will be the fetcher but it may be worth consolidating all the various mtime caches in bitbake into this module. Its worth assuming that once we've checked the mtime of a file, it won't change again through the lifetime of bitbake (unless the cache is manually cleared maybe from a user like the hob UI). The fetcher needs a new function which simply returns a string representing the SRC_URI checksums. This will mean different things to the different url backends. We're primarily interested in file:// urls here but this is a good opporutnty to explicitly add the SRC_URI[md5sum] info (and friends) into the task checksum too. We can then call this function explictly from base.bbclass to add the string to the data for the do_fetch task and everything should be correctly tied into the sstate checksums. Merged to master in the following commits: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=66b0eceecab670e5530b60599867ea0c828457bd http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8b8be74ed21b878b2fe30d5b76ff0648e6e48c18 http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d7b818b51f3e6dded0c0885cdfed5a24cda3b428 |