From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [[PATCHv2][Rebased] 1/2] license.bbclass: Don't copy again LICENSE already handled as no-generic
Date: Thu, 16 Feb 2017 10:45:31 -0600 [thread overview]
Message-ID: <1487263532-10730-1-git-send-email-anibal.limon@linux.intel.com> (raw)
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
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
meta/classes/license.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 9923aac..2b980c0 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:
--
2.1.4
next reply other threads:[~2017-02-16 16:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 16:45 Aníbal Limón [this message]
2017-02-16 16:45 ` [[PATCHv2][Rebased] 2/2] classes/license.bbclass: Don't copy unneeded licenses by package Aníbal Limón
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487263532-10730-1-git-send-email-anibal.limon@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox