[oe-commits] [bitbake] branch master updated: fetch2/npm: fix ud.registry so that alternative registries can be handled

git at git.openembedded.org git at git.openembedded.org
Sat Mar 12 09:36:25 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

The following commit(s) were added to refs/heads/master by this push:
       new  7c849be   fetch2/npm: fix ud.registry so that alternative registries can be handled
7c849be is described below

commit 7c849be7c70a5db4f66fe3041486abb923b5e4ee
Author: Brendan Le Foll <brendan.le.foll at intel.com>
AuthorDate: Fri Mar 11 10:32:58 2016 +0000

    fetch2/npm: fix ud.registry so that alternative registries can be handled
    
    Fixes [YOCTO #9231]
    
    npm when given an invalid registry URL with --registry actually goes and
    fetches from the default registry, but this commit makes sure it goes to the
    specified one.
    
    Signed-off-by: Brendan Le Foll <brendan.le.foll at intel.com>
    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 d44454c..e8d9b11 100644
--- a/lib/bb/fetch2/npm.py
+++ b/lib/bb/fetch2/npm.py
@@ -80,7 +80,7 @@ class Npm(FetchMethod):
         if not ud.version:
             raise ParameterError("NPM fetcher requires a version parameter", ud.url)
         ud.bbnpmmanifest = "%s-%s.deps.json" % (ud.pkgname, ud.version)
-        ud.registry = "http://%s" % ud.basename
+        ud.registry = "http://%s" % (ud.url.replace('npm://', '', 1).split(';'))[0]
         prefixdir = "npm/%s" % ud.pkgname
         ud.pkgdatadir = d.expand("${DL_DIR}/%s" % prefixdir)
         if not os.path.exists(ud.pkgdatadir):

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


More information about the Openembedded-commits mailing list