]> code.ossystems Code Review - openembedded-core.git/commitdiff
base: Don't print LICENSE warning for non-recipe context
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 2 Mar 2018 18:18:04 +0000 (18:18 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 4 Mar 2018 11:34:59 +0000 (11:34 +0000)
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>
meta/classes/base.bbclass

index 21cacfb9a55cff4e7471dcb626a3876a23b66309..b0a72c7a906a5c6b6653ba65d704777bea1f8fcb 100644 (file)
@@ -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):