There would be many obsolote sstate cache files in the SSTATE_DIR, it would be better if we have a script to remove them, I think that we can remove the duplicated files of one pkg by date. Another problem is that we can't remove the sstate files when run "bitbake pkg -cclean", it would better if we can't remove it by "do_clean", I think that we can add a variable in the conf file to do it, for example: SSTATE_REMOVE_FILE=yes would remove the sstate cache file, default is no.
There is the -ccleansstate function which combined clean with removal of the sstate files so I do not believe we need a SSTATE_REMOVE_FILE variable too. Having something to clean out old sstate files would be useful though.
Here is the design document: A script to clean the obsolete sstate cache file. * The script would be: poky/scripts/sstate-cache-management.sh * It can do the following things: 1) Print help information 2) Clean the duplicated files of one pkg, leave the newest one 3) Clean the sstate cache files by threshold, the older and duplicated files would be removed 4) There would be arguments for the user to choose whether do 2) or 3) * It would be implemented by shell script.
(In reply to comment #2) > Here is the design document: > > A script to clean the obsolete sstate cache file. > > * The script would be: > poky/scripts/sstate-cache-management.sh > > * It can do the following things: > 1) Print help information > 2) Clean the duplicated files of one pkg, leave the newest one > 3) Clean the sstate cache files by threshold, the older and duplicated > files would be removed It seems that the threshold is not needed when I'm working on it, we just leave the up to date one is OK. > 4) There would be arguments for the user to choose whether do 2) or 3) > > * It would be implemented by shell script.
Merged: http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=robert/remove-sstate&id=7b1bbbfe30e32b4cacde385b452d73a92a700dde
Verified. Tree/Branch: Poky/master Poky Commit: a8dc76ee69cfe1ffe846c07a510e3a562a5b1a7f