From 4a7ddff1836b782cd2feae82e0bbc17156d7b862 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Fri, 22 Jul 2011 15:37:44 +0100 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/ast.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'bitbake/lib/bb/parse') diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py index 2301abd12b..3f9065a34c 100644 --- a/bitbake/lib/bb/parse/ast.py +++ b/bitbake/lib/bb/parse/ast.py @@ -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) -- cgit v1.2.3-54-g00ecf