diff options
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r-- | bitbake/lib/bb/parse/ast.py | 14 |
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) |