summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-02 18:18:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-04 11:34:59 +0000
commit79240b3af32c7fa44751752e9e8f2ff832439643 (patch)
treef6dd94e3015314bc08856a388dc8c51e08b14a0f
parent9dd4af2b70f58540b2799823957aff3413068126 (diff)
downloadopenembedded-core-contrib-79240b3af32c7fa44751752e9e8f2ff832439643.tar.gz
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 <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/base.bbclass2
1 files changed, 1 insertions, 1 deletions
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):