summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-02-03 15:28:52 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-08 08:00:25 +0000
commit30a5c9edc64179545bcdc0e6b184fccdb9ac5948 (patch)
tree0f0377f3c947169e5986d74dda530d79a9f8c1f2 /meta/classes/license.bbclass
parent617e2e9413384d0530fd1b89d7509bb7d44aae54 (diff)
downloadpoky-30a5c9edc64179545bcdc0e6b184fccdb9ac5948.tar.gz
classes/license: tweak license format messages
Strictly speaking not all of these characters are operators, so reword the message to describe them as separators. Also use the standard "recipename: message" format. (From OE-Core rev: 9e5da3e83f2a5d43620e07a31728b7427329d8f4) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass15
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index d659b767c5..21465d8d00 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -417,19 +417,20 @@ def check_license_format(d):
417 """ 417 """
418 pn = d.getVar('PN', True) 418 pn = d.getVar('PN', True)
419 licenses = d.getVar('LICENSE', True) 419 licenses = d.getVar('LICENSE', True)
420 from oe.license import license_operator 420 from oe.license import license_operator, license_operator_chars, license_pattern
421 from oe.license import license_pattern
422 421
423 elements = filter(lambda x: x.strip(), license_operator.split(licenses)) 422 elements = filter(lambda x: x.strip(), license_operator.split(licenses))
424 for pos, element in enumerate(elements): 423 for pos, element in enumerate(elements):
425 if license_pattern.match(element): 424 if license_pattern.match(element):
426 if pos > 0 and license_pattern.match(elements[pos - 1]): 425 if pos > 0 and license_pattern.match(elements[pos - 1]):
427 bb.warn("Recipe %s, LICENSE (%s) has invalid format, " \ 426 bb.warn('%s: LICENSE value "%s" has an invalid format - license names ' \
428 "LICENSES must have operator \"%s\" between them." % 427 'must be separated by the following characters to indicate ' \
429 (pn, licenses, license_operator.pattern)) 428 'the license selection: %s' %
429 (pn, licenses, license_operator_chars))
430 elif not license_operator.match(element): 430 elif not license_operator.match(element):
431 bb.warn("Recipe %s, LICENSE (%s) has invalid operator (%s) not in" \ 431 bb.warn('%s: LICENSE value "%s" has an invalid separator "%s" that is not ' \
432 " \"%s\"." % (pn, licenses, element, license_operator.pattern)) 432 'in the valid list of separators (%s)' %
433 (pn, licenses, element, license_operator_chars))
433 434
434SSTATETASKS += "do_populate_lic" 435SSTATETASKS += "do_populate_lic"
435do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" 436do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"