]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: fetch2/npm: fix ud.registry so that alternative registries can be handled
authorBrendan Le Foll <brendan.le.foll@intel.com>
Fri, 11 Mar 2016 10:32:58 +0000 (10:32 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 12 Mar 2016 09:35:52 +0000 (09:35 +0000)
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.

(Bitbake rev: 7c849be7c70a5db4f66fe3041486abb923b5e4ee)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/npm.py

index d44454cb2c8109ec761f66744ede98c1baeaa2de..e8d9b11099719a6f1ff3a3ca1bdeda81f268262f 100644 (file)
@@ -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):