[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1585/8267] recipetool: record unknown license files
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1585/8267] recipetool: record unknown license files
- Date: Sat, 16 Dec 2017 22:02:01 +0000 (UTC)
commit 3ec9a621d000037a1657c0b18b5bdf3fb405a56c
Author: Paul Eggleton <paul eggleton linux intel com>
Date: Mon Jul 25 20:47:18 2016 +1200
recipetool: record unknown license files
Add a comment to the recipe listing license files that were found but
not able to be identified, so that the user can find and examine them
by hand fairly easily.
Fixes [YOCTO #9882].
(From OE-Core rev: 4b7d1bf8172533e9ac91a49ade152a05e2ee4146)
Signed-off-by: Paul Eggleton <paul eggleton linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
scripts/lib/recipetool/create.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py
index f246028..838c23b 100644
--- a/scripts/lib/recipetool/create.py
+++ b/scripts/lib/recipetool/create.py
@@ -479,12 +479,15 @@ def create_recipe(args):
licvalues = guess_license(srctree_use)
lic_files_chksum = []
+ lic_unknown = []
if licvalues:
licenses = []
for licvalue in licvalues:
if not licvalue[0] in licenses:
licenses.append(licvalue[0])
lic_files_chksum.append('file://%s;md5=%s' % (licvalue[1], licvalue[2]))
+ if licvalue[0] == 'Unknown':
+ lic_unknown.append(licvalue[1])
lines_before.append('# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses -
it is')
lines_before.append('# your responsibility to verify that the values are complete and correct.')
if len(licvalues) > 1:
@@ -493,6 +496,13 @@ def create_recipe(args):
lines_before.append('# these in the LICENSE value using & if the multiple licenses all apply, or
| if there')
lines_before.append('# is a choice between the multiple licenses. If in doubt, check the
accompanying')
lines_before.append('# documentation to determine which situation is applicable.')
+ if lic_unknown:
+ lines_before.append('#')
+ lines_before.append('# The following license files were not able to be identified and are')
+ lines_before.append('# represented as "Unknown" below, you will need to check them yourself:')
+ for licfile in lic_unknown:
+ lines_before.append('# %s' % licfile)
+ lines_before.append('#')
else:
lines_before.append('# Unable to find any files that looked like license statements. Check the
accompanying')
lines_before.append('# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM
accordingly.')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]