Skip to contentSkip to conversation

license.bbclass: Fixing LICENSE modifiers.

PATCH In review Elizabeth Flanagan 1 participant 1 message May 25, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 5/5 license.bbclass: Fixing LICENSE modifiers.

I support two license type modifiers. + meaning "or greater" and * meaning "with exceptions" for licenses that don't have a generic "with exceptions" (as some do).

For now, I'm stripping them out and doing the base generic

---
 meta/classes/license.bbclass |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
meta/classes/license.bbclass +7 -1
index 6a2998a..c20be98 100644
@@ -64,7 +64,13 @@ python do_populate_lic() {
             ast.NodeVisitor.generic_visit(self, node)
 
         def visit_Str(self, node):
-            find_license(node.s)
+            #
+            # Until I figure out what to do with
+            # the two modifiers I support (or greater = +
+            # and "with exceptions" being *
+            # we'll just strip out the modifier and put
+            # the base license.
+            find_license(node.s.replace("+", "").replace("*", ""))
             ast.NodeVisitor.generic_visit(self, node)
 
         def visit_BinOp(self, node):
Signature · 1 line
1.7.1