summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-02-07 09:08:50 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-07 14:36:01 +0000
commiteed25ff021f1919df08535042e505c6697496837 (patch)
tree7e747b660d931ae4607b7760aaec1b2569c79f99 /bitbake
parentd01b4bd15b94aca8344dd32517d7a4153637b025 (diff)
downloadpoky-eed25ff021f1919df08535042e505c6697496837.tar.gz
bitbake: fetch2/npm: handle items only in optionalDependencies
An npm package.json file has two dependency fields: dependencies and optionalDependencies. An item in optionalDependencies *may* also be listed in dependencies, but this is not required (and not necessary since if it's in optionalDependencies it will be optional, adding it to dependencies won't do anything). The code here was assuming that an optional dependency would always be in both, that's probably because that was true of the examples I was looking at at the time. To fix it, just add the optional ones to the list we're iterating over. (Bitbake rev: c0c50d43266150a80be31ae2c6fcaf37f5ba231d) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/npm.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index 3e352922e0..8c32f81c74 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -195,6 +195,7 @@ class Npm(FetchMethod):
195 195
196 dependencies = pdata.get('dependencies', {}) 196 dependencies = pdata.get('dependencies', {})
197 optionalDependencies = pdata.get('optionalDependencies', {}) 197 optionalDependencies = pdata.get('optionalDependencies', {})
198 dependencies.update(optionalDependencies)
198 depsfound = {} 199 depsfound = {}
199 optdepsfound = {} 200 optdepsfound = {}
200 data[pkg]['deps'] = {} 201 data[pkg]['deps'] = {}