diff options
author | Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> | 2020-01-24 18:08:13 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-27 16:48:10 +0000 |
commit | e0bd972ba7eaa5f3b0f5d93bf579cd79290d6601 (patch) | |
tree | 7d5686799ea1b8740c0da09b7c6279e5c3e3a2c9 /bitbake/lib/bb/fetch2/__init__.py | |
parent | 8b9505f1d4b139a71df3c184afa99bfd5bd9bc0b (diff) | |
download | poky-e0bd972ba7eaa5f3b0f5d93bf579cd79290d6601.tar.gz |
bitbake: fetch2: add the npmsw fetcher
This commit adds a new npmsw fetcher that fetches every npm dependencies
described in a npm shrinkwrap file:
https://docs.npmjs.com/files/shrinkwrap.json.html
The main package must be fetched separately:
SRC_URI = "npm://registry.url;package=foobar;version=1.0.0 \
npmsw://${THISDIR}/npm-shrinkwrap.json"
Since a separation has been created between the package and its
dependencies, the package can also be fetched with a non npm fetcher
without impacting the general behavior:
SRC_URI = "git://github.com/foo/bar.git;protocol=https \
npmsw://${THISDIR}/npm-shrinkwrap.json"
(Bitbake rev: f5223be54450bf20e0bfbd53b372a7748a44b475)
Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 4fe042739d..1b7f573642 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -1894,6 +1894,7 @@ from . import osc | |||
1894 | from . import repo | 1894 | from . import repo |
1895 | from . import clearcase | 1895 | from . import clearcase |
1896 | from . import npm | 1896 | from . import npm |
1897 | from . import npmsw | ||
1897 | 1898 | ||
1898 | methods.append(local.Local()) | 1899 | methods.append(local.Local()) |
1899 | methods.append(wget.Wget()) | 1900 | methods.append(wget.Wget()) |
@@ -1912,3 +1913,4 @@ methods.append(osc.Osc()) | |||
1912 | methods.append(repo.Repo()) | 1913 | methods.append(repo.Repo()) |
1913 | methods.append(clearcase.ClearCase()) | 1914 | methods.append(clearcase.ClearCase()) |
1914 | methods.append(npm.Npm()) | 1915 | methods.append(npm.Npm()) |
1916 | methods.append(npmsw.NpmShrinkWrap()) | ||