openembedded / meta-openembedded

MIT License
416 stars 716 forks source link

NodeJS includes runtime dependency from nodejs-npm package #771

Closed lorenzo-arena closed 10 months ago

lorenzo-arena commented 10 months ago

I'm using the nodejs recipe to run a JS file on a target device; I don't need npm and none of my recipes are referencing it. However, I'm getting npm and npx installed on the device due to the fact that the "nodejs" package depends on "nodejs-npm" (this can be found by looking at the control file in the created IPK package). How can that be? I'm not finding any explicit dependency between the two packages.

lorenzo-arena commented 10 months ago

This was due to a dangling link installed in the nodejs package, linking to the /usr/bin/corepack file. Since it was dangling, yocto automatically tries to search for the target in other packages and add them to the depenency list if the target file is found. This seems to be fixed in more recent versions of the recipe, like in the nanbield branch, but not in kirkstone.