summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-07-22 15:37:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-25 12:09:40 +0100
commit4a7ddff1836b782cd2feae82e0bbc17156d7b862 (patch)
tree89ea5119ec77187387d986e3fd30f485bdfef79b
parent04efff115c0d0e91fde021b7a264d51b85916daf (diff)
downloadpoky-4a7ddff1836b782cd2feae82e0bbc17156d7b862.tar.gz
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>
-rw-r--r--bitbake/lib/bb/parse/ast.py14
1 files changed, 8 insertions, 6 deletions
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):
427 427
428 extended = d.getVar("BBCLASSEXTEND", True) or "" 428 extended = d.getVar("BBCLASSEXTEND", True) or ""
429 if extended: 429 if extended:
430 # the following is to support bbextends with argument, for e.g. multilib 430 # the following is to support bbextends with arguments, for e.g. multilib
431 # an example is as follow: 431 # an example is as follows:
432 # BBCLASSEXTEND = "multilib:lib32" 432 # BBCLASSEXTEND = "multilib:lib32"
433 # it will create foo-lib32, inheriting multilib.bbclass and set 433 # it will create foo-lib32, inheriting multilib.bbclass and set
434 # CURRENTEXTEND to "lib32" 434 # BBEXTENDCURR to "multilib" and BBEXTENDVARIANT to "lib32"
435 extendedmap = {} 435 extendedmap = {}
436 variantmap = {}
436 437
437 for ext in extended.split(): 438 for ext in extended.split():
438 eext = ext.split(':') 439 eext = ext.split(':', 2)
439 if len(eext) > 1: 440 if len(eext) > 1:
440 extendedmap[eext[1]] = eext[0] 441 extendedmap[ext] = eext[0]
442 variantmap[ext] = eext[1]
441 else: 443 else:
442 extendedmap[ext] = ext 444 extendedmap[ext] = ext
443 445
@@ -445,7 +447,7 @@ def multi_finalize(fn, d):
445 def extendfunc(name, d): 447 def extendfunc(name, d):
446 if name != extendedmap[name]: 448 if name != extendedmap[name]:
447 d.setVar("BBEXTENDCURR", extendedmap[name]) 449 d.setVar("BBEXTENDCURR", extendedmap[name])
448 d.setVar("BBEXTENDVARIANT", name) 450 d.setVar("BBEXTENDVARIANT", variantmap[name])
449 else: 451 else:
450 d.setVar("PN", "%s-%s" % (pn, name)) 452 d.setVar("PN", "%s-%s" % (pn, name))
451 bb.parse.BBHandler.inherit([extendedmap[name]], d) 453 bb.parse.BBHandler.inherit([extendedmap[name]], d)