From 9e5da3e83f2a5d43620e07a31728b7427329d8f4 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 3 Feb 2015 15:28:52 +0000 Subject: 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. Signed-off-by: Paul Eggleton Signed-off-by: Ross Burton --- meta/classes/license.bbclass | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'meta/classes/license.bbclass') 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): """ pn = d.getVar('PN', True) licenses = d.getVar('LICENSE', True) - from oe.license import license_operator - from oe.license import license_pattern + from oe.license import license_operator, license_operator_chars, license_pattern elements = filter(lambda x: x.strip(), license_operator.split(licenses)) for pos, element in enumerate(elements): if license_pattern.match(element): if pos > 0 and license_pattern.match(elements[pos - 1]): - bb.warn("Recipe %s, LICENSE (%s) has invalid format, " \ - "LICENSES must have operator \"%s\" between them." % - (pn, licenses, license_operator.pattern)) + bb.warn('%s: LICENSE value "%s" has an invalid format - license names ' \ + 'must be separated by the following characters to indicate ' \ + 'the license selection: %s' % + (pn, licenses, license_operator_chars)) elif not license_operator.match(element): - bb.warn("Recipe %s, LICENSE (%s) has invalid operator (%s) not in" \ - " \"%s\"." % (pn, licenses, element, license_operator.pattern)) + bb.warn('%s: LICENSE value "%s" has an invalid separator "%s" that is not ' \ + 'in the valid list of separators (%s)' % + (pn, licenses, element, license_operator_chars)) SSTATETASKS += "do_populate_lic" do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" -- cgit v1.2.3