aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-22 12:20:04 +0000
committerRoss Burton <ross.burton@intel.com>2013-04-29 17:32:36 +0100
commitd4f366c00335d28b90e1b071631aa90ce9d38321 (patch)
treef82f1e1c38ecf25f70ad2e09d082afb7e0cf0785
parentccc272a3f7bf240733dc3af1d8d7b870c55e1f5b (diff)
downloadopenembedded-core-d4f366c00335d28b90e1b071631aa90ce9d38321.zip
openembedded-core-d4f366c00335d28b90e1b071631aa90ce9d38321.tar.gz
openembedded-core-d4f366c00335d28b90e1b071631aa90ce9d38321.tar.bz2
multilib/clsextend: Improve handling of regexps in PACKAGES_DYNAMIC
Now that PACKAGES_DYNAMIC is more standardised, starting with ^ anchors, the variable manipulations performed by clsextend for multilib don't work. This patch at least improves it to hack around the problem and enable mulitlib builds to work again. If this code doesn't do the right thing, the recipe is free to override the variable with the correct multilib case. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/multilib.bbclass2
-rw-r--r--meta/lib/oe/classextend.py16
2 files changed, 17 insertions, 1 deletions
diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index eaaad5f..3824f3b 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -75,7 +75,7 @@ python __anonymous () {
clsextend.map_depends_variable("DEPENDS")
clsextend.map_packagevars()
clsextend.map_variable("PROVIDES")
- clsextend.map_variable("PACKAGES_DYNAMIC")
+ clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
clsextend.map_variable("PACKAGE_INSTALL")
clsextend.map_variable("INITSCRIPT_PACKAGES")
}
diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py
index 86b1e8a..857a6c9 100644
--- a/meta/lib/oe/classextend.py
+++ b/meta/lib/oe/classextend.py
@@ -33,6 +33,22 @@ class ClassExtender(object):
self.d.setVar(varname, newdata)
return newdata
+ def map_regexp_variable(self, varname, setvar = True):
+ var = self.d.getVar(varname, True)
+ if not var:
+ return ""
+ var = var.split()
+ newvar = []
+ for v in var:
+ if v.startswith("^"):
+ newvar.append("^" + self.extname + "-" + v[1:])
+ else:
+ newvar.append(self.extend_name(v))
+ newdata = " ".join(newvar)
+ if setvar:
+ self.d.setVar(varname, newdata)
+ return newdata
+
def map_depends(self, dep):
if dep.endswith(("-native", "-native-runtime")):
return dep