diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch2/npm.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py index 15b281fb4f..780f26d37f 100644 --- a/bitbake/lib/bb/fetch2/npm.py +++ b/bitbake/lib/bb/fetch2/npm.py | |||
@@ -80,6 +80,7 @@ class Npm(FetchMethod): | |||
80 | if not ud.version: | 80 | if not ud.version: |
81 | raise ParameterError("NPM fetcher requires a version parameter", ud.url) | 81 | raise ParameterError("NPM fetcher requires a version parameter", ud.url) |
82 | ud.bbnpmmanifest = "%s-%s.deps.json" % (ud.pkgname, ud.version) | 82 | ud.bbnpmmanifest = "%s-%s.deps.json" % (ud.pkgname, ud.version) |
83 | ud.bbnpmmanifest = ud.bbnpmmanifest.replace('/', '-') | ||
83 | ud.registry = "http://%s" % (ud.url.replace('npm://', '', 1).split(';'))[0] | 84 | ud.registry = "http://%s" % (ud.url.replace('npm://', '', 1).split(';'))[0] |
84 | prefixdir = "npm/%s" % ud.pkgname | 85 | prefixdir = "npm/%s" % ud.pkgname |
85 | ud.pkgdatadir = d.expand("${DL_DIR}/%s" % prefixdir) | 86 | ud.pkgdatadir = d.expand("${DL_DIR}/%s" % prefixdir) |
@@ -92,6 +93,7 @@ class Npm(FetchMethod): | |||
92 | 93 | ||
93 | ud.write_tarballs = ((d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0") != "0") | 94 | ud.write_tarballs = ((d.getVar("BB_GENERATE_MIRROR_TARBALLS") or "0") != "0") |
94 | ud.mirrortarball = 'npm_%s-%s.tar.xz' % (ud.pkgname, ud.version) | 95 | ud.mirrortarball = 'npm_%s-%s.tar.xz' % (ud.pkgname, ud.version) |
96 | ud.mirrortarball = ud.mirrortarball.replace('/', '-') | ||
95 | ud.fullmirror = os.path.join(d.getVar("DL_DIR"), ud.mirrortarball) | 97 | ud.fullmirror = os.path.join(d.getVar("DL_DIR"), ud.mirrortarball) |
96 | 98 | ||
97 | def need_update(self, ud, d): | 99 | def need_update(self, ud, d): |
@@ -133,8 +135,7 @@ class Npm(FetchMethod): | |||
133 | 135 | ||
134 | def unpack(self, ud, destdir, d): | 136 | def unpack(self, ud, destdir, d): |
135 | dldir = d.getVar("DL_DIR") | 137 | dldir = d.getVar("DL_DIR") |
136 | depdumpfile = "%s-%s.deps.json" % (ud.pkgname, ud.version) | 138 | with open("%s/npm/%s" % (dldir, ud.bbnpmmanifest)) as datafile: |
137 | with open("%s/npm/%s" % (dldir, depdumpfile)) as datafile: | ||
138 | workobj = json.load(datafile) | 139 | workobj = json.load(datafile) |
139 | dldir = "%s/%s" % (os.path.dirname(ud.localpath), ud.pkgname) | 140 | dldir = "%s/%s" % (os.path.dirname(ud.localpath), ud.pkgname) |
140 | 141 | ||