From 1a992fd41861a30f1359169a83c16e99611a3e50 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 2 Mar 2018 18:18:04 +0000 Subject: 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). (From OE-Core rev: 79240b3af32c7fa44751752e9e8f2ff832439643) Signed-off-by: Richard Purdie --- meta/classes/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/classes/base.bbclass') 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): -- cgit v1.2.3-54-g00ecf