Bug 11461 - Poor interaction between sstate, devshell and addto_recipe_sysroot
Summary: Poor interaction between sstate, devshell and addto_recipe_sysroot
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: High normal
Target Milestone: 2.4 M2
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-05-05 04:01 UTC by Paul Eggleton
Modified: 2017-07-08 12:37 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2017-05-05 04:01:33 UTC
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's in nodejs-native's sysroot, but I can'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's sysroot files to its own sysroot is wiped out.

What'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't do anything; in theory I have to clean again but then I'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.
Comment 1 Paul Eggleton 2017-05-05 04:08:16 UTC
(In case it's not clear to everyone, this is by no means specific to nodejs-native / npm, it'll affect any native recipe; it just happened to be where I hit this.)
Comment 2 Richard Purdie 2017-05-09 11:15:03 UTC
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?