diff options
| -rw-r--r-- | bitbake/lib/bb/cooker.py | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index bf174859cb..be73c8a271 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
| @@ -87,10 +87,7 @@ class BBCooker: | |||
| 87 | 87 | ||
| 88 | bb.data.inheritFromOS(self.configuration.data) | 88 | bb.data.inheritFromOS(self.configuration.data) |
| 89 | 89 | ||
| 90 | for f in self.configuration.file: | 90 | self.parseConfigurationFiles(self.configuration.file) |
| 91 | self.parseConfigurationFile( f ) | ||
| 92 | |||
| 93 | self.parseConfigurationFile( os.path.join( "conf", "bitbake.conf" ) ) | ||
| 94 | 91 | ||
| 95 | if not self.configuration.cmd: | 92 | if not self.configuration.cmd: |
| 96 | self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build" | 93 | self.configuration.cmd = bb.data.getVar("BB_DEFAULT_TASK", self.configuration.data, True) or "build" |
| @@ -524,9 +521,29 @@ class BBCooker: | |||
| 524 | else: | 521 | else: |
| 525 | shell.start( self ) | 522 | shell.start( self ) |
| 526 | 523 | ||
| 527 | def parseConfigurationFile( self, afile ): | 524 | def parseConfigurationFiles(self, files): |
| 528 | try: | 525 | try: |
| 529 | self.configuration.data = bb.parse.handle( afile, self.configuration.data ) | 526 | data = self.configuration.data |
| 527 | for f in files: | ||
| 528 | data = bb.parse.handle(f, data) | ||
| 529 | |||
| 530 | layerconf = os.path.join(os.getcwd(), "conf", "bblayers.conf") | ||
| 531 | if os.path.exists(layerconf): | ||
| 532 | bb.msg.debug(2, bb.msg.domain.Parsing, "Found bblayers.conf (%s)" % layerconf) | ||
| 533 | data = bb.parse.handle(layerconf, data) | ||
| 534 | |||
| 535 | layers = (bb.data.getVar('BBLAYERS', data, True) or "").split() | ||
| 536 | |||
| 537 | for layer in layers: | ||
| 538 | bb.msg.debug(2, bb.msg.domain.Parsing, "Adding layer %s" % layer) | ||
| 539 | bb.data.setVar('LAYERDIR', layer, data) | ||
| 540 | data = bb.parse.handle(os.path.join(layer, "conf", "layer.conf"), data) | ||
| 541 | |||
| 542 | bb.data.delVar('LAYERDIR', data) | ||
| 543 | |||
| 544 | data = bb.parse.handle(os.path.join("conf", "bitbake.conf"), data) | ||
| 545 | |||
| 546 | self.configuration.data = data | ||
| 530 | 547 | ||
| 531 | # Handle any INHERITs and inherit the base class | 548 | # Handle any INHERITs and inherit the base class |
| 532 | inherits = ["base"] + (bb.data.getVar('INHERIT', self.configuration.data, True ) or "").split() | 549 | inherits = ["base"] + (bb.data.getVar('INHERIT', self.configuration.data, True ) or "").split() |
| @@ -543,9 +560,9 @@ class BBCooker: | |||
| 543 | bb.event.fire(bb.event.ConfigParsed(), self.configuration.data) | 560 | bb.event.fire(bb.event.ConfigParsed(), self.configuration.data) |
| 544 | 561 | ||
| 545 | except IOError, e: | 562 | except IOError, e: |
| 546 | bb.msg.fatal(bb.msg.domain.Parsing, "Error when parsing %s: %s" % (afile, str(e))) | 563 | bb.msg.fatal(bb.msg.domain.Parsing, "Error when parsing %s: %s" % (files, str(e))) |
| 547 | except bb.parse.ParseError, details: | 564 | except bb.parse.ParseError, details: |
| 548 | bb.msg.fatal(bb.msg.domain.Parsing, "Unable to parse %s (%s)" % (afile, details) ) | 565 | bb.msg.fatal(bb.msg.domain.Parsing, "Unable to parse %s (%s)" % (files, details) ) |
| 549 | 566 | ||
| 550 | def handleCollections( self, collections ): | 567 | def handleCollections( self, collections ): |
| 551 | """Handle collections""" | 568 | """Handle collections""" |
