summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorParthiban Nallathambi <pn@denx.de>2018-11-16 19:07:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-21 11:54:47 +0000
commit83b587e77baac9991a1073af99c82210d07e2b90 (patch)
tree560a8b7de7bb18db904fdfece12c46eb0c3422dc /bitbake
parent5dd8df08c51bc4cc1ef0d5be7656c9bfcf938cca (diff)
downloadpoky-83b587e77baac9991a1073af99c82210d07e2b90.tar.gz
bitbake: fetch2/npm.py: Allow shrinkwrap resolved relative URL which startswith 'http' (e.g http-proxy)
shrinkwrap resolved relative URL can start with http. For example, "resolved: http-proxy/-/http-proxy-${PV}.tgz" is still relative URL to npm registry, but starts with http. Current if statement compares the startswith 'resolved' to 'http', which makes impossible to use npm download. Condtional comparison now strictly checks for "http://" and "https://" (Bitbake rev: f76075aa1a5159fd4d62949cb588346888b9fe60) Signed-off-by: Parthiban Nallathambi <pn@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-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 408dfc3d03..65bf5a3644 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -226,7 +226,7 @@ class Npm(FetchMethod):
226 self._getshrinkeddependencies(obj, data['dependencies'][obj], data['dependencies'][obj]['version'], d, ud, lockdown, manifest, False) 226 self._getshrinkeddependencies(obj, data['dependencies'][obj], data['dependencies'][obj]['version'], d, ud, lockdown, manifest, False)
227 return 227 return
228 outputurl = "invalid" 228 outputurl = "invalid"
229 if ('resolved' not in data) or (not data['resolved'].startswith('http')): 229 if ('resolved' not in data) or (not data['resolved'].startswith('http://') and not data['resolved'].startswith('https://')):
230 # will be the case for ${PN} 230 # will be the case for ${PN}
231 fetchcmd = "npm view %s@%s dist.tarball --registry %s" % (pkg, version, ud.registry) 231 fetchcmd = "npm view %s@%s dist.tarball --registry %s" % (pkg, version, ud.registry)
232 logger.debug(2, "Found this matching URL: %s" % str(fetchcmd)) 232 logger.debug(2, "Found this matching URL: %s" % str(fetchcmd))