summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/recipetool/create.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index f246028a02..838c23ba9b 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -479,12 +479,15 @@ def create_recipe(args):
479 479
480 licvalues = guess_license(srctree_use) 480 licvalues = guess_license(srctree_use)
481 lic_files_chksum = [] 481 lic_files_chksum = []
482 lic_unknown = []
482 if licvalues: 483 if licvalues:
483 licenses = [] 484 licenses = []
484 for licvalue in licvalues: 485 for licvalue in licvalues:
485 if not licvalue[0] in licenses: 486 if not licvalue[0] in licenses:
486 licenses.append(licvalue[0]) 487 licenses.append(licvalue[0])
487 lic_files_chksum.append('file://%s;md5=%s' % (licvalue[1], licvalue[2])) 488 lic_files_chksum.append('file://%s;md5=%s' % (licvalue[1], licvalue[2]))
489 if licvalue[0] == 'Unknown':
490 lic_unknown.append(licvalue[1])
488 lines_before.append('# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is') 491 lines_before.append('# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is')
489 lines_before.append('# your responsibility to verify that the values are complete and correct.') 492 lines_before.append('# your responsibility to verify that the values are complete and correct.')
490 if len(licvalues) > 1: 493 if len(licvalues) > 1:
@@ -493,6 +496,13 @@ def create_recipe(args):
493 lines_before.append('# these in the LICENSE value using & if the multiple licenses all apply, or | if there') 496 lines_before.append('# these in the LICENSE value using & if the multiple licenses all apply, or | if there')
494 lines_before.append('# is a choice between the multiple licenses. If in doubt, check the accompanying') 497 lines_before.append('# is a choice between the multiple licenses. If in doubt, check the accompanying')
495 lines_before.append('# documentation to determine which situation is applicable.') 498 lines_before.append('# documentation to determine which situation is applicable.')
499 if lic_unknown:
500 lines_before.append('#')
501 lines_before.append('# The following license files were not able to be identified and are')
502 lines_before.append('# represented as "Unknown" below, you will need to check them yourself:')
503 for licfile in lic_unknown:
504 lines_before.append('# %s' % licfile)
505 lines_before.append('#')
496 else: 506 else:
497 lines_before.append('# Unable to find any files that looked like license statements. Check the accompanying') 507 lines_before.append('# Unable to find any files that looked like license statements. Check the accompanying')
498 lines_before.append('# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.') 508 lines_before.append('# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.')