bitbake/ast: include class name when arguments given in variant

For multilib this produces variants of e.g. "multilib:lib64" instead of
just "lib64"; however we set BBEXTENDVARIANT to "lib64" and the latter
will be used when composing filenames for multilib.

(Bitbake rev: de7a2b91512bb3ab058f5eb5cd188acd2b8a2220)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2011-07-22 15:37:44 +01:00
committed by Richard Purdie
parent 04efff115c
commit 4a7ddff183

View File

@@ -427,17 +427,19 @@ 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:
# the following is to support bbextends with arguments, for e.g. multilib
# an example is as follows:
# BBCLASSEXTEND = "multilib:lib32"
# it will create foo-lib32, inheriting multilib.bbclass and set
# CURRENTEXTEND to "lib32"
# BBEXTENDCURR to "multilib" and BBEXTENDVARIANT to "lib32"
extendedmap = {}
variantmap = {}
for ext in extended.split():
eext = ext.split(':')
eext = ext.split(':', 2)
if len(eext) > 1:
extendedmap[eext[1]] = eext[0]
extendedmap[ext] = eext[0]
variantmap[ext] = eext[1]
else:
extendedmap[ext] = ext
@@ -445,7 +447,7 @@ def multi_finalize(fn, d):
def extendfunc(name, d):
if name != extendedmap[name]:
d.setVar("BBEXTENDCURR", extendedmap[name])
d.setVar("BBEXTENDVARIANT", name)
d.setVar("BBEXTENDVARIANT", variantmap[name])
else:
d.setVar("PN", "%s-%s" % (pn, name))
bb.parse.BBHandler.inherit([extendedmap[name]], d)