summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Strasser <kevin.strasser@linux.intel.com>2013-06-12 13:27:15 -0700
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-07-08 10:30:19 +0100
commitaa02769727203650bfebf38082a2dadcc7e3b443 (patch)
tree3df3ad98b3db12a41183437b0dc34c64a35c2239
parentaf5120e5ff3a0ad960554ff4ab0e17673c239f9e (diff)
downloadopenembedded-core-aa02769727203650bfebf38082a2dadcc7e3b443.tar.gz
openembedded-core-aa02769727203650bfebf38082a2dadcc7e3b443.tar.bz2
openembedded-core-aa02769727203650bfebf38082a2dadcc7e3b443.zip
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 master 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>
-rw-r--r--meta/classes/archiver.bbclass5
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):
bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
else:
if is_included:
- return True, 'recipe has included licenses: %s' % ', '.join(reason)
+ if reason:
+ return True, 'recipe has included licenses: %s' % ', '.join(reason)
+ else:
+ return False, 'recipe does not include a copyleft license'
else:
return False, 'recipe has excluded licenses: %s' % ', '.join(reason)