diff options
| author | BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com> | 2023-06-04 03:39:19 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-29 11:10:39 +0100 |
| commit | 55f2e2035035ac52c096018dbb38103c5301082c (patch) | |
| tree | 1bd46b9a80ad9c00a0799a54b8d2f787a45cbb89 /bitbake/lib/bb/fetch2 | |
| parent | d3642c2d102787cd3b12a5ad319b37a3d58220b1 (diff) | |
| download | poky-55f2e2035035ac52c096018dbb38103c5301082c.tar.gz | |
bitbake: fetch2/npm: Remove special caracters that causes recipe tool to fail
Packages like @(._.)/execute causes problems because they generate names
that are not supported by yocto
(Bitbake rev: b2e1be67d2acca27451bed59874bc1c2a7ec44a6)
Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
| -rw-r--r-- | bitbake/lib/bb/fetch2/npm.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py index e6d0598f5d..f83485ad85 100644 --- a/bitbake/lib/bb/fetch2/npm.py +++ b/bitbake/lib/bb/fetch2/npm.py | |||
| @@ -44,9 +44,12 @@ def npm_package(package): | |||
| 44 | """Convert the npm package name to remove unsupported character""" | 44 | """Convert the npm package name to remove unsupported character""" |
| 45 | # Scoped package names (with the @) use the same naming convention | 45 | # Scoped package names (with the @) use the same naming convention |
| 46 | # as the 'npm pack' command. | 46 | # as the 'npm pack' command. |
| 47 | if package.startswith("@"): | 47 | name = re.sub("/", "-", package) |
| 48 | return re.sub("/", "-", package[1:]) | 48 | name = name.lower() |
| 49 | return package | 49 | name = re.sub(r"[^\-a-z0-9]", "", name) |
| 50 | name = name.strip("-") | ||
| 51 | return name | ||
| 52 | |||
| 50 | 53 | ||
| 51 | def npm_filename(package, version): | 54 | def npm_filename(package, version): |
| 52 | """Get the filename of a npm package""" | 55 | """Get the filename of a npm package""" |
