All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] npm: in cases where shrinkwrap resolved a git URL, ignore it and grab dist.tarball
@ 2016-02-29 14:27 brendan.le.foll
  0 siblings, 0 replies; only message in thread
From: brendan.le.foll @ 2016-02-29 14:27 UTC (permalink / raw
  To: bitbake-devel

From: Brendan Le Foll <brendan.le.foll@intel.com>

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>
---
 lib/bb/fetch2/npm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/npm.py b/lib/bb/fetch2/npm.py
index 212d167..44c181b 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))
-- 
2.7.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-29 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 14:27 [PATCH] npm: in cases where shrinkwrap resolved a git URL, ignore it and grab dist.tarball brendan.le.foll

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.