summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-04-12 22:41:26 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-13 10:54:09 +0100
commit0440cbccda83f34232bff9b450a2a45eda7ff596 (patch)
tree9dd33e204d000564fd85a7d73199cd052c83fa78 /scripts
parent9dc4707035e50381d70e5b63f0371534b4faa81c (diff)
downloadpoky-0440cbccda83f34232bff9b450a2a45eda7ff596.tar.gz
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. (From OE-Core rev: abe2955df2dc558de6068d9373dfcb47d690704b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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):
240 packages['${PN}'] = '' 240 packages['${PN}'] = ''
241 pkglicenses = split_pkg_licenses(licvalues, packages, lines_after, licenses) 241 pkglicenses = split_pkg_licenses(licvalues, packages, lines_after, licenses)
242 all_licenses = list(set([item.replace('_', ' ') for pkglicense in pkglicenses.values() for item in pkglicense])) 242 all_licenses = list(set([item.replace('_', ' ') for pkglicense in pkglicenses.values() for item in pkglicense]))
243 all_licenses.remove('&') 243 if '&' in all_licenses:
244 all_licenses.remove('&')
244 # Go back and update the LICENSE value since we have a bit more 245 # Go back and update the LICENSE value since we have a bit more
245 # information than when that was written out (and we know all apply 246 # information than when that was written out (and we know all apply
246 # vs. there being a choice, so we can join them with &) 247 # vs. there being a choice, so we can join them with &)