diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 33697a71d5..d183abab6d 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -495,6 +495,7 @@ class BBCooker: | |||
495 | """ | 495 | """ |
496 | fn = None | 496 | fn = None |
497 | envdata = None | 497 | envdata = None |
498 | mc = '' | ||
498 | if not pkgs_to_build: | 499 | if not pkgs_to_build: |
499 | pkgs_to_build = [] | 500 | pkgs_to_build = [] |
500 | 501 | ||
@@ -503,6 +504,12 @@ class BBCooker: | |||
503 | self.enableDataTracking() | 504 | self.enableDataTracking() |
504 | self.reset() | 505 | self.reset() |
505 | 506 | ||
507 | def mc_base(p): | ||
508 | if p.startswith('multiconfig:'): | ||
509 | s = p.split(':') | ||
510 | if len(s) == 2: | ||
511 | return s[1] | ||
512 | return None | ||
506 | 513 | ||
507 | if buildfile: | 514 | if buildfile: |
508 | # Parse the configuration here. We need to do it explicitly here since | 515 | # Parse the configuration here. We need to do it explicitly here since |
@@ -513,18 +520,16 @@ class BBCooker: | |||
513 | fn = self.matchFile(fn) | 520 | fn = self.matchFile(fn) |
514 | fn = bb.cache.realfn2virtual(fn, cls, mc) | 521 | fn = bb.cache.realfn2virtual(fn, cls, mc) |
515 | elif len(pkgs_to_build) == 1: | 522 | elif len(pkgs_to_build) == 1: |
516 | ignore = self.data.getVar("ASSUME_PROVIDED") or "" | 523 | mc = mc_base(pkgs_to_build[0]) |
517 | if pkgs_to_build[0] in set(ignore.split()): | 524 | if not mc: |
518 | bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0]) | 525 | ignore = self.data.getVar("ASSUME_PROVIDED") or "" |
526 | if pkgs_to_build[0] in set(ignore.split()): | ||
527 | bb.fatal("%s is in ASSUME_PROVIDED" % pkgs_to_build[0]) | ||
519 | 528 | ||
520 | taskdata, runlist = self.buildTaskData(pkgs_to_build, None, self.configuration.abort, allowincomplete=True) | 529 | taskdata, runlist = self.buildTaskData(pkgs_to_build, None, self.configuration.abort, allowincomplete=True) |
521 | 530 | ||
522 | mc = runlist[0][0] | 531 | mc = runlist[0][0] |
523 | fn = runlist[0][3] | 532 | fn = runlist[0][3] |
524 | else: | ||
525 | envdata = self.data | ||
526 | data.expandKeys(envdata) | ||
527 | parse.ast.runAnonFuncs(envdata) | ||
528 | 533 | ||
529 | if fn: | 534 | if fn: |
530 | try: | 535 | try: |
@@ -533,6 +538,12 @@ class BBCooker: | |||
533 | except Exception as e: | 538 | except Exception as e: |
534 | parselog.exception("Unable to read %s", fn) | 539 | parselog.exception("Unable to read %s", fn) |
535 | raise | 540 | raise |
541 | else: | ||
542 | if not mc in self.databuilder.mcdata: | ||
543 | bb.fatal('Not multiconfig named "%s" found' % mc) | ||
544 | envdata = self.databuilder.mcdata[mc] | ||
545 | data.expandKeys(envdata) | ||
546 | parse.ast.runAnonFuncs(envdata) | ||
536 | 547 | ||
537 | # Display history | 548 | # Display history |
538 | with closing(StringIO()) as env: | 549 | with closing(StringIO()) as env: |