diff options
author | Brendan Le Foll <brendan.le.foll@intel.com> | 2016-02-29 14:27:43 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-02 22:41:22 +0000 |
commit | 44e3461969c23cbe999e424c1dc2c0d772454d96 (patch) | |
tree | 4c92892c5bb6d3074d52d9e12729f417d55b7305 /bitbake | |
parent | 2a7318133bbd64f5dcb2ddf400229d4627925580 (diff) | |
download | poky-44e3461969c23cbe999e424c1dc2c0d772454d96.tar.gz |
bitbake: npm: in cases where shrinkwrap resolved a git URL, ignore it and grab dist.tarball
npm-shrinkwrap will sometimes resolve a git URL which instead of a http url, in
this case go and grab the dist.tarball via npm instead of using the resolved
URL.
(Bitbake rev: eb53b927ff59aa19cf28bc46beb9f9a185a59990)
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/npm.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py index 7d5e8913fb..46644f1bba 100644 --- a/bitbake/lib/bb/fetch2/npm.py +++ b/bitbake/lib/bb/fetch2/npm.py | |||
@@ -175,7 +175,7 @@ class Npm(FetchMethod): | |||
175 | def _getshrinkeddependencies(self, pkg, data, version, d, ud, lockdown, manifest): | 175 | def _getshrinkeddependencies(self, pkg, data, version, d, ud, lockdown, manifest): |
176 | logger.debug(2, "NPM shrinkwrap file is %s" % data) | 176 | logger.debug(2, "NPM shrinkwrap file is %s" % data) |
177 | outputurl = "invalid" | 177 | outputurl = "invalid" |
178 | if ('resolved' not in data): | 178 | if ('resolved' not in data) or (not data['resolved'].startswith('http')): |
179 | # will be the case for ${PN} | 179 | # will be the case for ${PN} |
180 | fetchcmd = "npm view %s@%s dist.tarball --registry %s" % (pkg, version, ud.registry) | 180 | fetchcmd = "npm view %s@%s dist.tarball --registry %s" % (pkg, version, ud.registry) |
181 | logger.debug(2, "Found this matching URL: %s" % str(fetchcmd)) | 181 | logger.debug(2, "Found this matching URL: %s" % str(fetchcmd)) |