[oe-commits] [bitbake] branch master-next updated: fetch2/npm.py: Allow shrinkwrap resolved relative URL which startswith 'http' (e.g http-proxy)

git at git.openembedded.org git at git.openembedded.org
Tue Nov 20 14:14:54 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

The following commit(s) were added to refs/heads/master-next by this push:
     new f76075a  fetch2/npm.py: Allow shrinkwrap resolved relative URL which startswith 'http' (e.g http-proxy)
f76075a is described below

commit f76075aa1a5159fd4d62949cb588346888b9fe60
Author: Parthiban Nallathambi <pn at denx.de>
AuthorDate: Fri Nov 16 19:07:12 2018 +0100

    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://"
    
    Signed-off-by: Parthiban Nallathambi <pn at denx.de>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 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 408dfc3..65bf5a3 100644
--- a/lib/bb/fetch2/npm.py
+++ b/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))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list