summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/license.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 11d45f3867..caf7628d09 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -406,6 +406,8 @@ def find_license_files(d):
406 generic_directory = d.getVar('COMMON_LICENSE_DIR') 406 generic_directory = d.getVar('COMMON_LICENSE_DIR')
407 # List of basename, path tuples 407 # List of basename, path tuples
408 lic_files_paths = [] 408 lic_files_paths = []
409 # hash for keep track generic lics mappings
410 non_generic_lics = {}
409 # Entries from LIC_FILES_CHKSUM 411 # Entries from LIC_FILES_CHKSUM
410 lic_chksums = {} 412 lic_chksums = {}
411 license_source_dirs = [] 413 license_source_dirs = []
@@ -468,6 +470,7 @@ def find_license_files(d):
468 # of the package rather than the license_source_dirs. 470 # of the package rather than the license_source_dirs.
469 lic_files_paths.append(("generic_" + license_type, 471 lic_files_paths.append(("generic_" + license_type,
470 os.path.join(srcdir, non_generic_lic), None, None)) 472 os.path.join(srcdir, non_generic_lic), None, None))
473 non_generic_lics[non_generic_lic] = license_type
471 else: 474 else:
472 # Add explicity avoid of CLOSED license because this isn't generic 475 # Add explicity avoid of CLOSED license because this isn't generic
473 if license_type != 'CLOSED': 476 if license_type != 'CLOSED':
@@ -503,6 +506,9 @@ def find_license_files(d):
503 lic_chksum_paths[os.path.basename(path)][data] = (os.path.join(srcdir, path), data[1], data[2]) 506 lic_chksum_paths[os.path.basename(path)][data] = (os.path.join(srcdir, path), data[1], data[2])
504 for basename, files in lic_chksum_paths.items(): 507 for basename, files in lic_chksum_paths.items():
505 if len(files) == 1: 508 if len(files) == 1:
509 # Don't copy again a LICENSE already handled as non-generic
510 if basename in non_generic_lics:
511 continue
506 data = list(files.values())[0] 512 data = list(files.values())[0]
507 lic_files_paths.append(tuple([basename] + list(data))) 513 lic_files_paths.append(tuple([basename] + list(data)))
508 else: 514 else: