<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>1682</bug_id>
          
          <creation_ts>2011-10-17 01:04:41 +0000</creation_ts>
          <short_desc>A scripts to clean obsolote sstate cache files</short_desc>
          <delta_ts>2012-03-09 02:30:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>(P3)(QA testing completed) (Done)</status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16889</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2011-10-17 01:04:41 +0000</bug_when>
    <thetext>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&apos;t remove the sstate files when run &quot;bitbake pkg -cclean&quot;, it would better if we can&apos;t remove it by &quot;do_clean&quot;, 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16890</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-10-17 01:19:47 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18663</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-02-20 23:58:05 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18698</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-02-22 04:49:17 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Here is the design document:
&gt; 
&gt; A script to clean the obsolete sstate cache file.
&gt; 
&gt; * The script would be:
&gt;   poky/scripts/sstate-cache-management.sh
&gt; 
&gt; * It can do the following things:
&gt;   1) Print help information
&gt;   2) Clean the duplicated files of one pkg, leave the newest one
&gt;   3) Clean the sstate cache files by threshold, the older and duplicated
&gt;      files would be removed

It seems that the threshold is not needed when I&apos;m working on it, we just leave
the up to date one is OK.

&gt;   4) There would be arguments for the user to choose whether do 2) or 3)
&gt; 
&gt; * It would be implemented by shell script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18754</commentid>
    <comment_count>4</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2012-02-25 10:17:36 +0000</bug_when>
    <thetext>Merged:

http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=robert/remove-sstate&amp;id=7b1bbbfe30e32b4cacde385b452d73a92a700dde</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18931</commentid>
    <comment_count>5</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2012-03-09 02:30:33 +0000</bug_when>
    <thetext>Verified.

Tree/Branch: Poky/master
Poky Commit: a8dc76ee69cfe1ffe846c07a510e3a562a5b1a7f</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>