summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-04-14 14:38:18 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:33 +0100
commitc04cee7ce8fedb4ff947039ebf9357e28c06bba7 (patch)
tree494d5050f125bd58fef0822013783551249b2b99
parent323812513868a08f932705335fdb4fe62f828144 (diff)
downloadpoky-c04cee7ce8fedb4ff947039ebf9357e28c06bba7.tar.gz
Search up the directory tree for bblayers.conf
(Bitbake rev: 1c6b31c649474b4c2b63ef9d9311e61de20bc8c2) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--bitbake/lib/bb/cooker.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 7a19740cc8..613654db85 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -510,14 +510,23 @@ class BBCooker:
510 else: 510 else:
511 shell.start( self ) 511 shell.start( self )
512 512
513 def _findLayerConf(self):
514 path = os.getcwd()
515 while path != "/":
516 bblayers = os.path.join(path, "conf", "bblayers.conf")
517 if os.path.exists(bblayers):
518 return bblayers
519
520 path, _ = os.path.split(path)
521
513 def parseConfigurationFiles(self, files): 522 def parseConfigurationFiles(self, files):
514 try: 523 try:
515 data = self.configuration.data 524 data = self.configuration.data
516 for f in files: 525 for f in files:
517 data = bb.parse.handle(f, data) 526 data = bb.parse.handle(f, data)
518 527
519 layerconf = os.path.join(os.getcwd(), "conf", "bblayers.conf") 528 layerconf = self._findLayerConf()
520 if os.path.exists(layerconf): 529 if layerconf:
521 bb.msg.debug(2, bb.msg.domain.Parsing, "Found bblayers.conf (%s)" % layerconf) 530 bb.msg.debug(2, bb.msg.domain.Parsing, "Found bblayers.conf (%s)" % layerconf)
522 data = bb.parse.handle(layerconf, data) 531 data = bb.parse.handle(layerconf, data)
523 532
@@ -565,6 +574,7 @@ class BBCooker:
565 574
566 bb.event.fire(bb.event.ConfigParsed(), self.configuration.data) 575 bb.event.fire(bb.event.ConfigParsed(), self.configuration.data)
567 576
577
568 except IOError, e: 578 except IOError, e:
569 bb.msg.fatal(bb.msg.domain.Parsing, "Error when parsing %s: %s" % (files, str(e))) 579 bb.msg.fatal(bb.msg.domain.Parsing, "Error when parsing %s: %s" % (files, str(e)))
570 except bb.parse.ParseError, details: 580 except bb.parse.ParseError, details: