summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorAnders Darander <anders@chargestorm.se>2017-03-01 18:19:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-04 10:42:32 +0000
commit39127702cee80c972ee9a447ef4006751f47475e (patch)
tree99f451d1e40ee6db01ca1f891761cd4b60970250 /scripts/lib
parent3c4291bc58bcc5c66ef539eed29b7c37ac968a06 (diff)
downloadopenembedded-core-39127702cee80c972ee9a447ef4006751f47475e.tar.gz
openembedded-core-39127702cee80c972ee9a447ef4006751f47475e.tar.bz2
openembedded-core-39127702cee80c972ee9a447ef4006751f47475e.zip
scripts/lib/create_npm: rewrite see license in eula
Rewrite the 'SEE LICENSE IN EULA' to a single string (without spaces), to avoid splitting the string later on. (Otherwise, each word gets split, and assumed to be a license on it's own. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/recipetool/create_npm.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py
index d3fcd99deb..3a88592b73 100644
--- a/scripts/lib/recipetool/create_npm.py
+++ b/scripts/lib/recipetool/create_npm.py
@@ -45,8 +45,10 @@ class NpmRecipeHandler(RecipeHandler):
license = data['license']
if isinstance(license, dict):
license = license.get('type', None)
- if 'MIT/X11' in license:
- license = 'MIT'
+ if license:
+ license = license.replace('MIT/X11', 'MIT')
+ license = license.replace('SEE LICENSE IN EULA',
+ 'SEE-LICENSE-IN-EULA')
return license
def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before):