From 07f94fa1d661d38b775ce2d99b84e5610c369392 Mon Sep 17 00:00:00 2001 From: Elizabeth Flanagan Date: Fri, 9 Dec 2011 16:05:24 -0800 Subject: license/copyleft: exception for ast parse As the standard for LICENSE format is not well defined, we may well run into issues where LICENSE cannot be parsed via ast. In cases like this, we need to warn and continue. Signed-off-by: Elizabeth Flanagan Signed-off-by: Richard Purdie --- meta/classes/copyleft_compliance.bbclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta/classes/copyleft_compliance.bbclass') diff --git a/meta/classes/copyleft_compliance.bbclass b/meta/classes/copyleft_compliance.bbclass index 5d9ab11926..2fe524b5f3 100644 --- a/meta/classes/copyleft_compliance.bbclass +++ b/meta/classes/copyleft_compliance.bbclass @@ -48,6 +48,8 @@ def copyleft_should_include(d): licenses = oe.license.flattened_licenses(d.getVar('LICENSE', True), choose_licenses) except oe.license.InvalidLicense as exc: bb.fatal('%s: %s' % (d.getVar('PF', True), exc)) + except SyntaxError: + bb.warn("%s: Failed to parse it's LICENSE field." % (d.getVar('PF', True))) return all(include_license(lic) for lic in licenses) -- cgit 1.2.3-korg