Re: [bitbake-devel] [PATCH 1/7] cooker: fix bitbake -b silently ignoring bbappends

Richard Purdie <[email protected]>
Newsgroups org.openembedded.lists.bitbake-devel
Message-ID <79d9178d92f476b3571cc8038b2ebbf7583a03aa.camel@linuxfoundation.org>
On Sat, 2026-08-15 at 15:46 +0200, Adrian Freihofer via lists.openembedded.org wrote:
> From: Adrian Freihofer <[email protected]>
> 
> "bitbake -b <recipe.bb>" builds the recipe without applying any of its
> .bbappend files.
> 
> buildFileInternal() resolves appends via
> self.collections[mc].get_file_appends(fn), but self.collections[mc] is
> only ever filled in by collect_bbfiles(), called from updateCache() -
> a path -b deliberately skips. matchFiles(), the one -b-path function
> that does call collect_bbfiles(), built a fresh CookerCollectFiles into
> a throwaway local instead of self.collections[mc], so the append list
> stayed empty (or, on a memory-resident server, stale from the last
> full parse - e.g. missing a devtool/externalsrc workspace .bbappend
> added since). Nothing warns that the built metadata differs from disk.
> 
> Make matchFiles() refresh self.collections[mc] itself so the later
> append lookup for the same fn sees the same fresh collection.
> 
> AI-Generated: Uses GitHub Copilot
> 
> Signed-off-by: Adrian Freihofer <[email protected]>
> ---
>  lib/bb/cooker.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

I've not checked but doesn't this only add limited collections data so
whilst it fixes -b, it potentially corrupts the cache for the non -b
cases?

This is definitely something we should fix, I just want to make sure
this doesn't corrupt something else. I suspect it deliberately doesn't
write to self...

Cheers,

Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.