<?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>1500</bug_id>
          
          <creation_ts>2011-09-20 08:43:11 +0000</creation_ts>
          <short_desc>Document invalidation of the sstate on a per class basis</short_desc>
          <delta_ts>2011-12-14 10:39:29 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>7493f5e7ec641e7cd79f8e3e6c045cadf7a6999c</bug_file_loc>
          <status_whiteboard>14-dec-2011: Resolved/fixed</status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hatle">mark.hatle</reporter>
          <assigned_to name="Scott Rifenbark">srifenbark</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</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>16320</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2011-09-20 08:43:11 +0000</bug_when>
    <thetext>In the recent work for 1499, a change was needed to rpmdeps output.  The result of this change is that all of the &quot;package&quot;, and &quot;package_write_rpm&quot;/deploy-rpm sstate-cache items should have been invalidated.  However there is currently no mechanism to invalidate certain elements of the sstate-cache based on external changes.

I would suggest that we add an ability for classes, and recipes to inject additional versioning information into specific steps for the use by the sstate system to determine if part of the cache needs to be invalidated.  In this case, I would have wanted to invalidated the &apos;package&apos; step and expected the &apos;package_write_...&apos; steps to be regenerated as an artifact of that change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16331</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-09-20 12:36:41 +0000</bug_when>
    <thetext>This isn&apos;t strictly true, all you need to do is make some change to th package_rpm.bbclass code itself and that would trigger all the rpm packages to get regenerated. This could be some version number you add there or we could just rely on making some changes to the code itself (even a comment at the top of the main function would likely be enough).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16332</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2011-09-20 13:02:42 +0000</bug_when>
    <thetext>The place where I hit it, was because I changed &quot;rpmdeps&quot; which is used by package.bbclass, which the output of which is used by package_write_rpm.

So simply changing package_rpm.bbclass would not have regenerated the RPM packages properly, as the built-in dependency information would still be wrong -- until package.bbclass was re-run.

If we can simply make a small change to package.bbclass (say a phantom version variable or something) that would be enough to fix the issue I was seeing.

The trick of course is for someone to know that if I change rpmdeps within rpm-native, that I need to uprev the version in packages otherwise we don&apos;t regenerate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16333</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-09-20 14:05:29 +0000</bug_when>
    <thetext>Yes, changing a version in package.bbclass would work in this case (and the rpms would then rebuild since they depend on that).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16779</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-10-07 05:42:11 +0000</bug_when>
    <thetext>I&apos;m going to change this to a documentation issue for sstate. I believe we can invalidate the cache, we just need to better expose the mechanism.

The change in question is http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17401</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-25 09:02:52 +0000</bug_when>
    <thetext>Proposed manual addition:

&quot;&quot;&quot;
If its desired to change the checksum of a given subset of tasks, maybe
due to a change which isn&apos;t directly visible in the code itself (e.g. a
tool changed its output) its possible to do this by changing a function
comments since the sstate checksums include the body of functions. To
invalidate package sstate files for example, do_package or one of the
functions it calls can be changed, even if its just a cosmetic change to
the commends.
http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54 is an example of a commit which does this.
&quot;&quot;&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17643</commentid>
    <comment_count>6</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2011-12-14 10:39:29 +0000</bug_when>
    <thetext>New chapter introduced into the YP Reference manual.  This chapter is titled &quot;Technical Details&quot; and contains information currently about YP components and shared state code.  The section that describes shared state includes some history behind how the problem was solved and ways to deal with specific problems around it.  One of the problems addresses how to invalidate the sstate on a per class basis.  This information is in &quot;Tips and Tricks.&quot;

The text is on review and might have some edits to it later.

To see the text, go here:

http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html#shared-state-cache</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>