]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Fix PACKAGECONFIG handling when no flags are set
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 5 Mar 2012 21:01:21 +0000 (13:01 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 5 Mar 2012 21:03:41 +0000 (13:03 -0800)
When the main PACKAGECONFIG variable was empty with no flags set,
the options were not being added to explicitly disable features.
This patch corrects that problem and ensures the disable fields
are correctly parsed and added to variables.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass

index 82dcda9aec72db1f1a2fde08ff32d8736a9b4077..c8ed5447e4b497afbe7c563b35efcddaee0f3585 100644 (file)
@@ -302,8 +302,9 @@ python () {
     #
     # PACKAGECONFIG ?? = "<default options>"
     # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends"
-    pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
-    if pkgconfig:
+    pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
+    if pkgconfigflags:
+        pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
         def appendVar(varname, appends):
             if not appends:
                 return
@@ -313,7 +314,7 @@ python () {
         extradeps = []
         extrardeps = []
         extraconf = []
-        for flag, flagval in (d.getVarFlags("PACKAGECONFIG") or {}).items():
+        for flag, flagval in pkgconfigflags.items():
             if flag == "defaultval":
                 continue
             items = flagval.split(",")