<?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>11461</bug_id>
          
          <creation_ts>2017-05-05 04:01:33 +0000</creation_ts>
          <short_desc>Poor interaction between sstate, devshell and addto_recipe_sysroot</short_desc>
          <delta_ts>2017-07-08 12:37:57 +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>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>73063</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-05-05 04:01:33 +0000</bug_when>
    <thetext>If I do the following:

1) bitbake nodejs-native
2) bitbake -c clean nodejs-native
3) bitbake nodejs-native  (now restoring from sstate)
4) bitbake -c addto_recipe_sysroot nodejs-native
5) bitbake -c devshell nodejs-native

In theory I should be able to run npm because it&apos;s in nodejs-native&apos;s sysroot, but I can&apos;t because do_devshell has a dependency on do_patch, which depends on do_unpack which depends on do_fetch which will call clean_recipe_sysroot and my addition of nodejs-native&apos;s sysroot files to its own sysroot is wiped out.

What&apos;s even more annoying is if I then try to run bitbake -c addto_recipe_sysroot nodejs-native again, that task is still stamped as having run so it won&apos;t do anything; in theory I have to clean again but then I&apos;m stuck in the same situation. I could of course force the task, cleansstate and rebuild from scratch, or delete the stamp by hand, but none of those solutions are ideal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73064</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-05-05 04:08:16 +0000</bug_when>
    <thetext>(In case it&apos;s not clear to everyone, this is by no means specific to nodejs-native / npm, it&apos;ll affect any native recipe; it just happened to be where I hit this.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73138</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-05-09 11:15:03 +0000</bug_when>
    <thetext>I think we may need to teach clean_recipe_sysroot to wipe out any addto_recipe_sysroot stamps? Not perfect but would at least give you a way out of this situation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74886</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-07-08 12:37:57 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=af950e2c0923996788fa147feddbf4a9522b30f4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>