Bug 1682 - A scripts to clean obsolote sstate cache files
Summary: A scripts to clean obsolote sstate cache files
Status: VERIFIED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.2
Hardware: x86 Multiple
: Low enhancement
Target Milestone: 1.2 M3
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard: (P3)(QA testing completed) (Done)
Depends on:
Blocks:
 
Reported: 2011-10-17 01:04 UTC by Robert Yang
Modified: 2012-03-09 02:30 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Yang 2011-10-17 01:04:41 UTC
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.
Comment 1 Richard Purdie 2011-10-17 01:19:47 UTC
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.
Comment 2 Robert Yang 2012-02-20 23:58:05 UTC
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.
Comment 3 Robert Yang 2012-02-22 04:49:17 UTC
(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.
Comment 5 Yi Zhao 2012-03-09 02:30:33 UTC
Verified.

Tree/Branch: Poky/master
Poky Commit: a8dc76ee69cfe1ffe846c07a510e3a562a5b1a7f