]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: move invalid PACKAGECONFIG checking to insane.bbclass
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 30 Jul 2015 15:18:09 +0000 (08:18 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 Aug 2015 09:52:37 +0000 (10:52 +0100)
There was a problem when check invalid PACKAGECONFIG in the anonymous
function (when parsing), for example, there are two versions of a
recipe:
foo_1.0.bb
foo_2.0.bb
While foo_2.0.bb has a "PACKAGECONFIG[item] = 'x,y,z'", but foo_1.0.bb
doesn't, if we set PACKAGECONFIG_pn-foo = "item" in a conf file, we
would get the warning about invalid PACKAGECONFIG for foo_1.0.bb. Delay
the checking to build time will fix the problem.

[YOCTO #8065]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass
meta/classes/insane.bbclass

index 531b0e72c0fcd041108c9397e9bf4e837fe64e69..f0780011bd58d4b510cd0f18a9734ecd657a8b4b 100644 (file)
@@ -353,10 +353,6 @@ python () {
         pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
         pn = d.getVar("PN", True)
 
-        for pconfig in pkgconfig:
-            if pconfig not in pkgconfigflags:
-                bb.warn("%s: invalid PACKAGECONFIG: %s" % (pn, pconfig))
-
         mlprefix = d.getVar("MLPREFIX", True)
 
         def expandFilter(appends, extension, prefix):
index fc3d5fffde264252a89ba39d018e8d1c4ae8b730..9c05c862a1608b1d20da5242638f437ce0b8e977 100644 (file)
@@ -31,6 +31,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
             installed-vs-shipped compile-host-path install-host-path \
             pn-overrides infodir build-deps file-rdeps \
             unknown-configure-option symlink-to-sysroot multilib \
+            invalid-pkgconfig \
             "
 ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
             perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -1139,6 +1140,16 @@ Missing inherit gettext?""" % (gt, config))
                 package_qa_handle_error("unknown-configure-option", error_msg, d)
         except subprocess.CalledProcessError:
             pass
+
+    # Check invalid PACKAGECONFIG
+    pkgconfig = (d.getVar("PACKAGECONFIG", True) or "").split()
+    if pkgconfig:
+        pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
+        for pconfig in pkgconfig:
+            if pconfig not in pkgconfigflags:
+                pn = d.getVar('PN', True)
+                error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pconfig)
+                package_qa_handle_error("invalid-pkgconfig", error_msg, d)
 }
 
 python do_qa_unpack() {