Bug 1109 - sstate sometimes needs tmp/work/ directories in place to finish build from sstate-cache
Summary: sstate sometimes needs tmp/work/ directories in place to finish build from ss...
Status: RESOLVED WONTFIX
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Low enhancement
Target Milestone: 1.1 M3
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-05-26 13:47 UTC by Martin Jansa
Modified: 2011-06-07 07:25 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
error.log (3.41 KB, text/plain)
2011-05-26 13:47 UTC, Martin Jansa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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).