create_npm.py: convert MIT/X11 to MIT

Quite a few npm packages declare MIT/X11 as their license. This is equal to
a pure MIT license.

(From OE-Core rev: 8df5e731a10cc9ade1266e9daaa26ec7c855c062)

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:56 +01:00 committed by Richard Purdie
parent 13c54959dd
commit ca83f35f5a
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,8 @@ class NpmRecipeHandler(RecipeHandler):
license = data['license']
if isinstance(license, dict):
license = license.get('type', None)
if 'MIT/X11' in license:
license = 'MIT'
return license
def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before):