diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/license.bbclass | 15 |
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 | ||
434 | SSTATETASKS += "do_populate_lic" | 435 | SSTATETASKS += "do_populate_lic" |
435 | do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" | 436 | do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}" |