Bug 15739

Summary: cache file with source revisions is no longer being created after refactor away from sqlite
Product: [Build System, Metadata & Runtime] BitBake Reporter: Alexander Kanavin <alex.kanavin>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher
Version: unspecified   
Target Milestone: 0.0.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alexander Kanavin 2025-02-07 12:14:59 UTC
This commit
https://git.openembedded.org/bitbake/commit/?id=fdc55bb649cb77456d0ac48a9600ef289a52af18

seems to have introduced a regression where the cache file (local_srcrevisions.dat) is never actually written out to disk.

This can be observed by creating a clean poky build with master, running 'bitbake -c unpack m4-native', and looking in build/cache:

alex@Zen2:/srv/storage/alex/yocto/build-test-cache$ ls cache/
bb_codeparser.dat  bb_unihashes.dat  hashserv.db  hashserv.db-shm  hashserv.db-wal  local_file_checksum_cache.dat  sanity_info


This should be addressed by calling 

    bb.fetch2.fetcher_parse_save()
    bb.fetch2.fetcher_parse_done()

during bitbake shutdown but I'm not sure why it isn't happening.
Comment 1 Richard Purdie 2025-02-07 12:31:11 UTC
You'd need to have something actually needing a stored revision to write out the cache file (i.e. using AUTOREV)? I doubt it would write an empty file.
Comment 2 Alexander Kanavin 2025-02-07 13:03:24 UTC
Right, if I add 

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-dev"

then the file appears. False alarm then.