[OE-core] [PATCH 1/3] base: Don't print LICENSE warning for non-recipe context

Richard Purdie richard.purdie at linuxfoundation.org
Sat Mar 3 17:08:42 UTC 2018


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 at linuxfoundation.org>
---
 meta/classes/base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 21cacfb..b0a72c7 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):
-- 
2.7.4




More information about the Openembedded-core mailing list