Skip to contentSkip to conversation

license_class: Add explicity avoid of CLOSED license in validations

PATCH In review Aníbal Limón 2 participants 2 messages May 18, 2015 – May 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 license_class: Add explicity avoid of CLOSED license in validations

The CLOSED license isn't a generic license it is a set and can be any closed source license.

[YOCTO #7752]

---
 meta/classes/license.bbclass | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
meta/classes/license.bbclass +8 -2
index 7972c79..756e7f0 100644
@@ -80,6 +80,10 @@ python license_create_manifest() {
                 lic_file = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
                                         pkg_dic[pkg]["PN"], "generic_%s" % 
                                         re.sub('\+', '', lic))
+                # add explicity avoid of CLOSED license because isn't generic
+                if lic == "CLOSED":
+                   continue
+
                 if not os.path.exists(lic_file):
                    bb.warn("The license listed %s was not in the "\ 
                             "licenses collected for recipe %s" 
@@ -278,8 +282,10 @@ def find_license_files(d):
                     lic_files_paths.append(("generic_" + license_type, path))
                     break
         else:
-            # And here is where we warn people that their licenses are lousy
-            bb.warn("%s: No generic license file exists for: %s in any provider" % (pn, license_type))
+            # Add explicity avoid of CLOSED license because this isn't generic
+            if license_type != 'CLOSED':
+                # And here is where we warn people that their licenses are lousy
+                bb.warn("%s: No generic license file exists for: %s in any provider" % (pn, license_type))
             pass
 
     if not generic_directory:
Signature · 1 line
1.8.4.5
#1 lore raw
Quoted 28 lines · Aníbal Limón

The CLOSED license isn't a generic license it is a set and can be any closed source license.

[YOCTO #7752]

---
 meta/classes/license.bbclass | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
meta/classes/license.bbclass +4 -0
index 7972c79..756e7f0 100644
@@ -80,6 +80,10 @@ python license_create_manifest() {
                 lic_file = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
                                         pkg_dic[pkg]["PN"], "generic_%s" % 
                                         re.sub('\+', '', lic))
+                # add explicity avoid of CLOSED license because isn't generic
+                if lic == "CLOSED":
+                   continue
+
                 if not os.path.exists(lic_file):
                    bb.warn("The license listed %s was not in the "\ 
                             "licenses collected for recipe %s" 
@@ -278,8 +282,10 @@ def find_license_files(d):
                     lic_files_paths.append(("generic_" + license_type, path))
                     break

meta/classes/license.bbclass def find_license_files(d): · line 291

Quoted 10 lines
meta/classes/license.bbclass +4 -2
         else:
-            # And here is where we warn people that their licenses are lousy
-            bb.warn("%s: No generic license file exists for: %s in any provider" % (pn, license_type))
+            # Add explicity avoid of CLOSED license because this isn't generic
+            if license_type != 'CLOSED':
+                # And here is where we warn people that their licenses are lousy
+                bb.warn("%s: No generic license file exists for: %s in any provider" % (pn, license_type))
             pass
 
     if not generic_directory:

ACK

Signature · 7 lines
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:[email protected]
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058