[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4792/8267] license.bbclass: Don't copy again LICENSE already handled as no-generic
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4792/8267] license.bbclass: Don't copy again LICENSE already handled as no-generic
- Date: Sun, 17 Dec 2017 02:32:01 +0000 (UTC)
commit 5a2a1ec16b62c8aaffcf9aa7acfd297e68a001f8
Author: Aníbal Limón <anibal limon linux intel com>
Date: Thu Feb 16 10:45:31 2017 -0600
license.bbclass: Don't copy again LICENSE already handled as no-generic
The NO_GENERIC_LICENSE mapping was added [1] to enable copy LICENSES
from upstream source code into recipe licenses, previously that only
common-licenses was processed.
This result on copy twice the NO_GENERIC_LICENSE specified because there
is a mapping between license in LIC_CHKSUM and NO_GENERIC_LICENSE.
In order to avoid double copy one as generic_ and other as LICENSE. keep
track of licenses already copied.
For linux-firmware the result will be only generic_ licenses into
common-licenses.
[YOCTO #10325]
[1] http://lists.openembedded.org/pipermail/openembedded-core/2015-April/104222.html
(From OE-Core rev: 95b9e2cd26c7cae265ff52af90480b75251f00e5)
Signed-off-by: Aníbal Limón <anibal limon linux intel com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/license.bbclass | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 11d45f3..caf7628 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -406,6 +406,8 @@ def find_license_files(d):
generic_directory = d.getVar('COMMON_LICENSE_DIR')
# List of basename, path tuples
lic_files_paths = []
+ # hash for keep track generic lics mappings
+ non_generic_lics = {}
# Entries from LIC_FILES_CHKSUM
lic_chksums = {}
license_source_dirs = []
@@ -468,6 +470,7 @@ def find_license_files(d):
# of the package rather than the license_source_dirs.
lic_files_paths.append(("generic_" + license_type,
os.path.join(srcdir, non_generic_lic), None, None))
+ non_generic_lics[non_generic_lic] = license_type
else:
# Add explicity avoid of CLOSED license because this isn't generic
if license_type != 'CLOSED':
@@ -503,6 +506,9 @@ def find_license_files(d):
lic_chksum_paths[os.path.basename(path)][data] = (os.path.join(srcdir, path), data[1], data[2])
for basename, files in lic_chksum_paths.items():
if len(files) == 1:
+ # Don't copy again a LICENSE already handled as non-generic
+ if basename in non_generic_lics:
+ continue
data = list(files.values())[0]
lic_files_paths.append(tuple([basename] + list(data)))
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]