Bug 1109

Summary: sstate sometimes needs tmp/work/ directories in place to finish build from sstate-cache
Product: [Build System, Metadata & Runtime] BitBake Reporter: Martin Jansa <Martin.Jansa>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: Low CC: poky.bs.watcher, poky.watcher, sgw
Version: unspecified   
Target Milestone: 1.1 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
error.log none

Description Martin Jansa 2011-05-26 13:47:17 UTC
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.
Comment 1 Richard Purdie 2011-06-07 07:25:27 UTC
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).