From: Richard Purdie Date: Fri, 2 Mar 2018 18:18:04 +0000 (+0000) Subject: base: Don't print LICENSE warning for non-recipe context X-Git-Tag: uninative-1.8~167 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=79240b3af32c7fa44751752e9e8f2ff832439643;p=openembedded-core.git base: Don't print LICENSE warning for non-recipe context Now bitbake is executing anonymous python fragments in bitbake -e, ensure we don't show the error in that context (where PN would be unchanged from default). Signed-off-by: Richard Purdie --- diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 21cacfb9a5..b0a72c7a90 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -456,7 +456,7 @@ python () { pn = d.getVar('PN') license = d.getVar('LICENSE') - if license == "INVALID": + if license == "INVALID" and pn != "defaultpkgname": bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn) if bb.data.inherits_class('license', d):