<?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>6639</bug_id>
          
          <creation_ts>2014-08-21 02:22:26 +0000</creation_ts>
          <short_desc>only allowed sstate-cache objects are allowed in a build (read-only sstate-cache)</short_desc>
          <delta_ts>2014-09-26 01:19:48 +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>OE-Core</product>
          <component>core</component>
          <version>1.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.7 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hongxu Jia">hongxu.jia</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>45183</commentid>
    <comment_count>0</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-08-21 02:22:26 +0000</bug_when>
    <thetext>Issue description:

The issue is that the developer who demand only the &quot;new&quot; software
they write is allowed to be compiled from source, they only want to
reuse binaries from an existed sstate-cache, if the developer makes
a change that triggers a rebuild, it should be an instant error. 

The purpose of this is for the sstate-cache to check if the item
exists or not. If it doesn&apos;t the item needs to be in a whitelist
or we need to fail.


Test steps:
1) Create a sstate cache for testing
$ bitbake db

2) Add gzip to SSTATECACHE_WHITELIST, it enabled read-only sstate-cache,
vim local.conf
...
SSTATECACHE_WHITELIST = &apos;gzip&apos;
...

3) Remove tmp dir and build db from sstate-cache succeed
$ mv tmp tmp-back &amp;&amp; bitbake db

4) tweak db&apos;s do_configure task by adding comments
--- a/meta/recipes-support/db/db_6.0.30.bb
+++ b/meta/recipes-support/db/db_6.0.30.bb
@@ -27,6 +27,8 @@ LIC_FILES_CHKSUM = &quot;file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490&quot;
@@ -82,6 +84,7 @@ do_configure() {
        gnu-configize --force ${S}
        export STRIP=&quot;true&quot;
        oe_runconf
+       echo &quot;hello&quot;
 }

5) build db and there is a build failure
$ bitbake db

6) clean db and there is a clean failure
bitbake db -ccleansstate

7) Append the missing recipe&apos;s PN to SSTATECACHE_WHITELIST
vim local.conf
...
SSTATECACHE_WHITELIST = &apos;gzip db rpm-native gcc-runtime eglibc linux-libc-headers libgcc&apos;
...

8) Build db and clean db succeed
$ bitbake db &amp;&amp; bitbake db -ccleansstate</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45873</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-09-26 01:19:48 +0000</bug_when>
    <thetext>We use locked sstate to instead</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>