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.
(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.)
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?
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=af950e2c0923996788fa147feddbf4a9522b30f4