diff options
author | Kevin Strasser <kevin.strasser@linux.intel.com> | 2013-06-12 13:27:15 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-06-17 16:45:35 +0100 |
commit | e1baa0de2858b6723975e16440f172b114f90f58 (patch) | |
tree | fe33eeab4e9878b0f0fc579861096bf003a09f57 /meta | |
parent | e5615e7482fd5b5cba1caddec5e61d15cfe2a627 (diff) | |
download | poky-e1baa0de2858b6723975e16440f172b114f90f58.tar.gz |
archiver.bbclass: check if package contains a copyleft license
The copyleft filter is only excluding packages that contain a
closed source license. This is because oe.license.is_included()
returns a boolean value that indicates if the license is excluded,
and a string that contains the matched included licenses. If the
string is empty it indicates that no licenses were matched.
Reject packages that do not contain a copyleft license.
[YOCTO 4630]
(From OE-Core rev: 3d0f9ee3d2fcce331d35467d5965ff44b825427f)
Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/archiver.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 6749d61678..3d75d8eba2 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass | |||
@@ -63,7 +63,10 @@ def copyleft_should_include(d): | |||
63 | bb.fatal('%s: %s' % (d.getVar('PF', True), exc)) | 63 | bb.fatal('%s: %s' % (d.getVar('PF', True), exc)) |
64 | else: | 64 | else: |
65 | if is_included: | 65 | if is_included: |
66 | return True, 'recipe has included licenses: %s' % ', '.join(reason) | 66 | if reason: |
67 | return True, 'recipe has included licenses: %s' % ', '.join(reason) | ||
68 | else: | ||
69 | return False, 'recipe does not include a copyleft license' | ||
67 | else: | 70 | else: |
68 | return False, 'recipe has excluded licenses: %s' % ', '.join(reason) | 71 | return False, 'recipe has excluded licenses: %s' % ', '.join(reason) |
69 | 72 | ||