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.

(From OE-Core rev: 39127702cee80c972ee9a447ef4006751f47475e)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Anders Darander 2017-03-01 18:19:59 +01:00 committed by Richard Purdie
parent 2db1227fa2
commit 837d89b47b
1 changed files with 4 additions and 2 deletions

View File

@ -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):