]> code.ossystems Code Review - openembedded-core.git/commitdiff
create_npm.py: convert MIT/X11 to MIT
authorAnders Darander <anders@chargestorm.se>
Wed, 1 Mar 2017 17:19:56 +0000 (18:19 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 4 Mar 2017 10:42:32 +0000 (10:42 +0000)
Quite a few npm packages declare MIT/X11 as their license. This is equal to
a pure MIT license.

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/recipetool/create_npm.py

index 3ba6de029cfa4458154b9d837311f1ec1fe0325e..d3fcd99deb8b9b2ad860d0fcbbf7259e28145eae 100644 (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):