From: Parthiban Nallathambi Date: Fri, 16 Nov 2018 18:07:12 +0000 (+0100) Subject: bitbake: fetch2/npm.py: Allow shrinkwrap resolved relative URL which startswith ... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=83b587e77baac9991a1073af99c82210d07e2b90;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py index 408dfc3d030..65bf5a36441 100644 --- a/bitbake/lib/bb/fetch2/npm.py +++ b/bitbake/lib/bb/fetch2/npm.py @@ -226,7 +226,7 @@ class Npm(FetchMethod): self._getshrinkeddependencies(obj, data['dependencies'][obj], data['dependencies'][obj]['version'], d, ud, lockdown, manifest, False) return outputurl = "invalid" - if ('resolved' not in data) or (not data['resolved'].startswith('http')): + if ('resolved' not in data) or (not data['resolved'].startswith('http://') and not data['resolved'].startswith('https://')): # 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))