summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorBrendan Le Foll <brendan.le.foll@intel.com>2016-02-29 14:27:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-02 22:41:22 +0000
commit44e3461969c23cbe999e424c1dc2c0d772454d96 (patch)
tree4c92892c5bb6d3074d52d9e12729f417d55b7305 /bitbake/lib/bb/fetch2
parent2a7318133bbd64f5dcb2ddf400229d4627925580 (diff)
downloadpoky-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/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/npm.py2
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))