summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/npm.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index 134bd35221..08d6876524 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -204,8 +204,15 @@ class Npm(FetchMethod):
204 for dep, version in depsfound.items(): 204 for dep, version in depsfound.items():
205 self._getdependencies(dep, data[pkg]['deps'], version, d, ud) 205 self._getdependencies(dep, data[pkg]['deps'], version, d, ud)
206 206
207 def _getshrinkeddependencies(self, pkg, data, version, d, ud, lockdown, manifest): 207 def _getshrinkeddependencies(self, pkg, data, version, d, ud, lockdown, manifest, toplevel=True):
208 logger.debug(2, "NPM shrinkwrap file is %s" % data) 208 logger.debug(2, "NPM shrinkwrap file is %s" % data)
209 if toplevel:
210 name = data.get('name', None)
211 if name and name != pkg:
212 for obj in data.get('dependencies', []):
213 if obj == pkg:
214 self._getshrinkeddependencies(obj, data['dependencies'][obj], data['dependencies'][obj]['version'], d, ud, lockdown, manifest, False)
215 return
209 outputurl = "invalid" 216 outputurl = "invalid"
210 if ('resolved' not in data) or (not data['resolved'].startswith('http')): 217 if ('resolved' not in data) or (not data['resolved'].startswith('http')):
211 # will be the case for ${PN} 218 # will be the case for ${PN}
@@ -231,7 +238,7 @@ class Npm(FetchMethod):
231 if 'dependencies' in data: 238 if 'dependencies' in data:
232 for obj in data['dependencies']: 239 for obj in data['dependencies']:
233 logger.debug(2, "Found dep is %s" % str(obj)) 240 logger.debug(2, "Found dep is %s" % str(obj))
234 self._getshrinkeddependencies(obj, data['dependencies'][obj], data['dependencies'][obj]['version'], d, ud, lockdown, manifest[pkg]['deps']) 241 self._getshrinkeddependencies(obj, data['dependencies'][obj], data['dependencies'][obj]['version'], d, ud, lockdown, manifest[pkg]['deps'], False)
235 242
236 def download(self, ud, d): 243 def download(self, ud, d):
237 """Fetch url""" 244 """Fetch url"""