siemens / meta-iot2050

SIMATIC IOT2050 Isar/Debian Board Support Package
MIT License
129 stars 76 forks source link

add support for PREMIRRORS for npm registry #380

Closed fmoessbauer closed 1 year ago

fmoessbauer commented 1 year ago

This patch enhances the npm class to support fetching npm modules via a registry specified in the PREMIRRORS bb variable. This can significantly speedup the build in CN where the US mirrors of npm are often slow.

Technically, we implement just a basic subset of the full PREMIRRORS functionality, as the actual fetching of NPM moduls is not done by by the bitbake fetcher, but as part of the npm class. To keep the code as minimal as possible, we also do not do connectivity checks of the mirror. In addition, the npm:// url has to be mirrored by another npm:// url but not a tarball, etc... as the standard bitbake fetcher would support.

Signed-off-by: Felix Moessbauer felix.moessbauer@siemens.com