summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/npm.py
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:40:50 +0000
commiteb53b927ff59aa19cf28bc46beb9f9a185a59990 (patch)
treed2738264b421a4a4e988cc1deff3528498ddc198 /lib/bb/fetch2/npm.py
parentb8113a1800687a37a26ac28deafdbafd74cc138e (diff)
downloadbitbake-contrib-eb53b927ff59aa19cf28bc46beb9f9a185a59990.tar.gz
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. Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/npm.py')
-rw-r--r--lib/bb/fetch2/npm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/npm.py b/lib/bb/fetch2/npm.py
index 7d5e8913f..46644f1bb 100644
--- a/lib/bb/fetch2/npm.py
+++ b/lib/bb/fetch2/npm.py
@@ -175,7 +175,7 @@ class Npm(FetchMethod):
def _getshrinkeddependencies(self, pkg, data, version, d, ud, lockdown, manifest):
logger.debug(2, "NPM shrinkwrap file is %s" % data)
outputurl = "invalid"
- if ('resolved' not in data):
+ if ('resolved' not in data) or (not data['resolved'].startswith('http')):
# will be the case for ${PN}
fetchcmd = "npm view %s@%s dist.tarball --registry %s" % (pkg, version, ud.registry)
logger.debug(2, "Found this matching URL: %s" % str(fetchcmd))