I've found another case where a wrong vardbapi matchcache makes emerge skip some package cleaning. It was again with a "less than one second for merging" package, gnome-base/gnome-2.4.2. The call path that leads to using/updating matchcache at the wrong time (ie during treewalk) was: doebuild -> (config.setcpv ->) config.reset -> config.regenerate -> autouse -> dep_check -> dep_wordreduce -> vardbapi.match I've added a use_cache parameter to each of this functions, again with default=1, and added a "use_cache=0" to doebuild(preinst/postinst) from treewalk. I've also applied the same change to doebuild(prerm/postrm) in unmerge, because it doesn't really makes sense to use matchcache from this function neither, since we know we are removing a vardb entry. Reproducible: Always Steps to Reproduce:
Created attachment 25117 [details, diff] use_cache.patch Patch is against 2.0.50.
In -r1