From 2806646a263527ec0487ea160afd4bdc0a3c1703 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 22 Oct 2012 12:20:04 +0000 Subject: 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. (From OE-Core rev: d4f366c00335d28b90e1b071631aa90ce9d38321) Signed-off-by: Richard Purdie --- meta/lib/oe/classextend.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'meta/lib/oe') diff --git a/meta/lib/oe/classextend.py b/meta/lib/oe/classextend.py index 86b1e8a554..857a6c97ef 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 -- cgit v1.2.3-54-g00ecf