summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-12 16:28:56 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-12 22:37:52 +1200
commit8619cdaa74a617eada0c2c20995fd777ecc45028 (patch)
tree2647fca6a960bf8fc7916636ea565e8713a049c6
parent210c518ba8f8d6ec6e9d34e0df8b963a3b2e0593 (diff)
downloadopenembedded-core-contrib-8619cdaa74a617eada0c2c20995fd777ecc45028.tar.gz
openembedded-core-contrib-8619cdaa74a617eada0c2c20995fd777ecc45028.tar.bz2
openembedded-core-contrib-8619cdaa74a617eada0c2c20995fd777ecc45028.zip
recipetool: create: fix for regression in npm license handling
OE-Core commit c0cfd9b1d54b05ad048f444d6fe248aa0500159e added handling for AND / OR in license strings coming from npm, but made the assumption that an & would always be present in the license value. Check if it's there first so we don't fail if it isn't. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--scripts/lib/recipetool/create_npm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py
index a21502679e..eb19555a8e 100644
--- a/scripts/lib/recipetool/create_npm.py
+++ b/scripts/lib/recipetool/create_npm.py
@@ -240,7 +240,8 @@ class NpmRecipeHandler(RecipeHandler):
packages['${PN}'] = ''
pkglicenses = split_pkg_licenses(licvalues, packages, lines_after, licenses)
all_licenses = list(set([item.replace('_', ' ') for pkglicense in pkglicenses.values() for item in pkglicense]))
- all_licenses.remove('&')
+ if '&' in all_licenses:
+ all_licenses.remove('&')
# Go back and update the LICENSE value since we have a bit more
# information than when that was written out (and we know all apply
# vs. there being a choice, so we can join them with &)