summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/cooker.py
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 /bitbake/lib/bb/cooker.py
parent323812513868a08f932705335fdb4fe62f828144 (diff)
downloadopenembedded-core-c04cee7ce8fedb4ff947039ebf9357e28c06bba7.tar.gz
openembedded-core-c04cee7ce8fedb4ff947039ebf9357e28c06bba7.tar.bz2
openembedded-core-c04cee7ce8fedb4ff947039ebf9357e28c06bba7.tar.xz
openembedded-core-c04cee7ce8fedb4ff947039ebf9357e28c06bba7.zip
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>
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-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 7a19740cc..613654db8 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -510,14 +510,23 @@ class BBCooker:
else:
shell.start( self )
+ def _findLayerConf(self):
+ path = os.getcwd()
+ while path != "/":
+ bblayers = os.path.join(path, "conf", "bblayers.conf")
+ if os.path.exists(bblayers):
+ return bblayers
+
+ path, _ = os.path.split(path)
+
def parseConfigurationFiles(self, files):
try:
data = self.configuration.data
for f in files:
data = bb.parse.handle(f, data)
- layerconf = os.path.join(os.getcwd(), "conf", "bblayers.conf")
- if os.path.exists(layerconf):
+ layerconf = self._findLayerConf()
+ if layerconf:
bb.msg.debug(2, bb.msg.domain.Parsing, "Found bblayers.conf (%s)" % layerconf)
data = bb.parse.handle(layerconf, data)
@@ -565,6 +574,7 @@ class BBCooker:
bb.event.fire(bb.event.ConfigParsed(), self.configuration.data)
+
except IOError, e:
bb.msg.fatal(bb.msg.domain.Parsing, "Error when parsing %s: %s" % (files, str(e)))
except bb.parse.ParseError, details: