summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-07 17:16:52 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-28 15:27:43 +0100
commita2b9ef9d78665393a94296f87b860486e854e3d3 (patch)
tree5b08b692b0872e0b8b18d45d913f79f3f5ea5572 /bitbake
parent21c5985812c889a4100114af06152c43cae78c1c (diff)
downloadast2050-yocto-poky-a2b9ef9d78665393a94296f87b860486e854e3d3.zip
ast2050-yocto-poky-a2b9ef9d78665393a94296f87b860486e854e3d3.tar.gz
bitbake/ast: Add optional argument for BBCLASSEXTEND
Add an optional argument to BBCLASSEXTEND entries which gets passed to the extention class as BBEXTENDVARIANT. Also add BBEXTENDCURR whic is set to the current extension class name. This mode functions slightly differently to the previous BBCLASSEXTEND code in that PN is not changed. (Bitbake rev: 8d3c899e0a15840c54de26d2f1fc552430517778) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/parse/ast.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index bf70ad2..e41bb74 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -427,13 +427,31 @@ def multi_finalize(fn, d):
extended = d.getVar("BBCLASSEXTEND", True) or ""
if extended:
+ # the following is to support bbextends with argument, for e.g. multilib
+ # an example is as follow:
+ # BBCLASSEXTEND = "multilib:lib32"
+ # it will create foo-lib32, inheriting multilib.bbclass and set
+ # CURRENTEXTEND to "lib32"
+ extendedmap = {}
+
+ for ext in extended.split():
+ eext = ext.split(':')
+ if len(eext) > 1:
+ extendedmap[eext[1]] = eext[0]
+ else:
+ extendedmap[ext] = ext
+
pn = d.getVar("PN", True)
def extendfunc(name, d):
- d.setVar("PN", "%s-%s" % (pn, name))
- bb.parse.BBHandler.inherit([name], d)
+ if name != extendedmap[name]:
+ d.setVar("BBEXTENDCURR", extendedmap[name])
+ d.setVar("BBEXTENDVARIANT", name)
+ else:
+ d.setVar("PN", "%s-%s" % (pn, name))
+ bb.parse.BBHandler.inherit([extendedmap[name]], d)
safe_d.setVar("BBCLASSEXTEND", extended)
- _create_variants(datastores, extended.split(), extendfunc)
+ _create_variants(datastores, extendedmap.keys(), extendfunc)
for variant, variant_d in datastores.iteritems():
if variant:
OpenPOWER on IntegriCloud