Created attachment 167 [details] error.log rm_work.bbclass have them excluded # The package and packages-split directories are retained by sstate for # do_package so we retain them here too. Anything in sstate 'plaindirs' # should be retained. Also retain logs and other files in temp. elif [ $dir != 'temp' ] && [ $dir != 'package' ] && [ $dir != 'packages-split' ]; tmp/work gets bigger and bigger in time (ie failed build is completely kept there if next successfull build is with different version - in different directory). It's hard to clean such leftovers selectively so "rm -rf tmp/work" is sometimes only option to regain enough space for next build. Now only option to solve error like example in attachement is to call -c cleanall to cleanup sstate cache and force full rebuild of failing package.
These directories being left behind is by design as sstate requires them and rm_work and sstate use the same mechanism behind the scenes. I therefore don't think we can reasonable do anything about this at this point. What we really need is a cleanup script which would remove "stale" old work directories however they became present (e.g. a build of a specific version failed or was only half completed before another upgrade).