summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-22 12:20:04 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-29 17:00:00 (GMT)
commit2806646a263527ec0487ea160afd4bdc0a3c1703 (patch)
treef08a2f47ef384fd6e652d721a9d320168309071f
parent995de756e344ab7965160a633c2a408bede7ed97 (diff)
downloadpoky-2806646a263527ec0487ea160afd4bdc0a3c1703.tar.gz
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 <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 () {
75 clsextend.map_depends_variable("DEPENDS") 75 clsextend.map_depends_variable("DEPENDS")
76 clsextend.map_packagevars() 76 clsextend.map_packagevars()
77 clsextend.map_variable("PROVIDES") 77 clsextend.map_variable("PROVIDES")
78 clsextend.map_variable("PACKAGES_DYNAMIC") 78 clsextend.map_regexp_variable("PACKAGES_DYNAMIC")
79 clsextend.map_variable("PACKAGE_INSTALL") 79 clsextend.map_variable("PACKAGE_INSTALL")
80 clsextend.map_variable("INITSCRIPT_PACKAGES") 80 clsextend.map_variable("INITSCRIPT_PACKAGES")
81} 81}
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):
33 self.d.setVar(varname, newdata) 33 self.d.setVar(varname, newdata)
34 return newdata 34 return newdata
35 35
36 def map_regexp_variable(self, varname, setvar = True):
37 var = self.d.getVar(varname, True)
38 if not var:
39 return ""
40 var = var.split()
41 newvar = []
42 for v in var:
43 if v.startswith("^"):
44 newvar.append("^" + self.extname + "-" + v[1:])
45 else:
46 newvar.append(self.extend_name(v))
47 newdata = " ".join(newvar)
48 if setvar:
49 self.d.setVar(varname, newdata)
50 return newdata
51
36 def map_depends(self, dep): 52 def map_depends(self, dep):
37 if dep.endswith(("-native", "-native-runtime")): 53 if dep.endswith(("-native", "-native-runtime")):
38 return dep 54 return dep