diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-04-12 22:41:26 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-13 10:54:09 +0100 |
commit | 0440cbccda83f34232bff9b450a2a45eda7ff596 (patch) | |
tree | 9dd33e204d000564fd85a7d73199cd052c83fa78 /scripts/lib/recipetool/create_npm.py | |
parent | 9dc4707035e50381d70e5b63f0371534b4faa81c (diff) | |
download | poky-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/lib/recipetool/create_npm.py')
-rw-r--r-- | scripts/lib/recipetool/create_npm.py | 3 |
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 &) |