[OE-core] [RFC][PATCH 0/6] NPM refactoring
Stefan Herbrechtsmeier
stefan at herbrechtsmeier.net
Fri Oct 25 09:10:22 UTC 2019
Hi Andre,
Am 25.10.19 um 10:01 schrieb André Draszik:
> Hi,
>
> This has been an interesting discussion so far.
>
> I'd like to throw in something else...
>
> A couple years back I wrote a little python script to automatically
> generate all the required dependency recipes given an npm project's
> package.json
This is similar to my prototype but I try to reuse the recipetool and
this makes the recipe creation very slow.
Do you reuse code from OE to generate the license information?
> The generated recipes worked very well, including cross-compilation using
> node-gyp.
Do you use any bbclass? I have create multiple bbclasses to minimize the
code inside the recipes.
> At least at the time this was all reasonably straight forward, avoided *any* use
> of npm, gave me all the benefits of reproducibility, yocto caching, license
> management, correct cross-compilation for native code, etc. Also, the
> generated yocto packages contained none of the test- or other items that
> npm packages usually contain and don't need to be copied onto the target
> for image builds. All this by simply inspecting the package.json
This is the reason I go this way too.
> This approach also minimised maintenance cost, as all recipes were auto-generated.
>
> The only downside was that bitbake became a bit slow, as the number of
> tasks went to about 15000.
Do you create a recipe per package version?
> I can dig this out and share on Monday. This script could live in the
> scripts/ subdirectory, allowing people to create recipes on demand for
> projects they care about.
Would be nice to see your code.
Regards
Stefan
More information about the Openembedded-core
mailing list