bitbake: fetch2/npmsw: Don't fetch dev dependencies when they are not demanded

Dev dependencies should not be fetched only if it is specified in the
recipe.

(Bitbake rev: 224c2bb1fd3f16ac4063dc0eb8ba43eee34ba782)

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
BELOUARGA Mohamed
2023-06-04 03:39:18 +02:00
committed by Richard Purdie
parent d988d31578
commit d3642c2d10

View File

@@ -49,6 +49,8 @@ def foreach_dependencies(shrinkwrap, callback=None, dev=False):
if package != "":
name = package.split('node_modules/')[-1]
package_infos = packages.get(package, {})
if dev == False and package_infos.get("dev", False):
continue
callback(name, package_infos, package)
class NpmShrinkWrap(FetchMethod):