[OE-core] [PATCH 5/7] scripts/lib/create_npm: rewrite see license in eula
Anders Darander
anders at chargestorm.se
Wed Mar 1 17:19:59 UTC 2017
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 at chargestorm.se>
---
scripts/lib/recipetool/create_npm.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/recipetool/create_npm.py b/scripts/lib/recipetool/create_npm.py
index 2816861..6a0f3c2 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):
--
2.10.2
More information about the Openembedded-core
mailing list