summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-02-07 09:08:51 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-07 14:36:01 +0000
commit8e61d6d8b79a76512d1fcb078fc92da881f9b2cb (patch)
tree041f1eed2f1f3651103dba457e5c41cbeee13645 /bitbake/lib/bb/fetch2
parenteed25ff021f1919df08535042e505c6697496837 (diff)
downloadpoky-8e61d6d8b79a76512d1fcb078fc92da881f9b2cb.tar.gz
bitbake: fetch2/npm: fix handling of os field
When I originally added this check I didn't quite understand how the values in this field should be expressed - it seems from reading the documentation if there is an entry starting with '!' then the list is a blacklist and we shouldn't expect "linux" to be in the list, or we'll end up skipping important dependencies. This fixes fetching the "statsd" npm package. Fixes [YOCTO #10760]. (Bitbake rev: 7aa6d1586417e0e7d9925917a82caee5884957db) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/npm.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index 8c32f81c74..15b281fb4f 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -182,7 +182,12 @@ class Npm(FetchMethod):
182 if pkg_os: 182 if pkg_os:
183 if not isinstance(pkg_os, list): 183 if not isinstance(pkg_os, list):
184 pkg_os = [pkg_os] 184 pkg_os = [pkg_os]
185 if 'linux' not in pkg_os or '!linux' in pkg_os: 185 blacklist = False
186 for item in pkg_os:
187 if item.startswith('!'):
188 blacklist = True
189 break
190 if (not blacklist and 'linux' not in pkg_os) or '!linux' in pkg_os:
186 logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg) 191 logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg)
187 return 192 return
188 #logger.debug(2, "Output URL is %s - %s - %s" % (ud.basepath, ud.basename, ud.localfile)) 193 #logger.debug(2, "Output URL is %s - %s - %s" % (ud.basepath, ud.basename, ud.localfile))