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>
This commit is contained in:
Brendan Le Foll 2016-02-29 14:27:43 +00:00 committed by Richard Purdie
parent 2a7318133b
commit 44e3461969
1 changed files with 1 additions and 1 deletions

View File

@ -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))