summaryrefslogtreecommitdiffstats
path: root/meta/classes/copyleft_compliance.bbclass
diff options
context:
space:
mode:
authorEric Bénard <eric@eukrea.com>2012-04-02 20:37:10 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-04 16:17:51 (GMT)
commit9ce92e439f2995b8e201461a0f76910b0b9a12f9 (patch)
tree1fa52eb1787c21762af77f9992eb364fcb1ecb55 /meta/classes/copyleft_compliance.bbclass
parent029f3c6dec94e6c71d8cdf8352092b1d855cd1f1 (diff)
downloadpoky-9ce92e439f2995b8e201461a0f76910b0b9a12f9.tar.gz
copyleft_compliance: also print the reason for including a package
(From OE-Core rev: 20996da46aff03e61de50444ab3a0ab46c057dfd) Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/copyleft_compliance.bbclass')
-rw-r--r--meta/classes/copyleft_compliance.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/copyleft_compliance.bbclass b/meta/classes/copyleft_compliance.bbclass
index 4082e7e..3ca7337 100644
--- a/meta/classes/copyleft_compliance.bbclass
+++ b/meta/classes/copyleft_compliance.bbclass
@@ -47,14 +47,14 @@ def copyleft_should_include(d):
47 exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d) 47 exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
48 48
49 try: 49 try:
50 is_included, excluded = oe.license.is_included(d.getVar('LICENSE', True), include, exclude) 50 is_included, reason = oe.license.is_included(d.getVar('LICENSE', True), include, exclude)
51 except oe.license.LicenseError as exc: 51 except oe.license.LicenseError as exc:
52 bb.fatal('%s: %s' % (d.getVar('PF', True), exc)) 52 bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
53 else: 53 else:
54 if is_included: 54 if is_included:
55 return True, None 55 return True, 'recipe has included licenses: %s' % ', '.join(reason)
56 else: 56 else:
57 return False, 'recipe has excluded licenses: %s' % ', '.join(excluded) 57 return False, 'recipe has excluded licenses: %s' % ', '.join(reason)
58 58
59python do_prepare_copyleft_sources () { 59python do_prepare_copyleft_sources () {
60 """Populate a tree of the recipe sources and emit patch series files""" 60 """Populate a tree of the recipe sources and emit patch series files"""
@@ -67,7 +67,7 @@ python do_prepare_copyleft_sources () {
67 bb.debug(1, 'copyleft: %s is excluded: %s' % (p, reason)) 67 bb.debug(1, 'copyleft: %s is excluded: %s' % (p, reason))
68 return 68 return
69 else: 69 else:
70 bb.debug(1, 'copyleft: %s is included' % p) 70 bb.debug(1, 'copyleft: %s is included: %s' % (p, reason))
71 71
72 sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', True) 72 sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', True)
73 src_uri = d.getVar('SRC_URI', True).split() 73 src_uri = d.getVar('SRC_URI', True).split()