summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cookerdata.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cookerdata.py')
-rw-r--r--bitbake/lib/bb/cookerdata.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 592bc2968e..397b43dfa7 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -210,7 +210,7 @@ def findConfigFile(configfile, data):
210 210
211# 211#
212# We search for a conf/bblayers.conf under an entry in BBPATH or in cwd working 212# We search for a conf/bblayers.conf under an entry in BBPATH or in cwd working
213# up to /. If that fails, we search for a conf/bitbake.conf in BBPATH. 213# up to /. If that fails, bitbake would fall back to cwd.
214# 214#
215 215
216def findTopdir(): 216def findTopdir():
@@ -223,11 +223,8 @@ def findTopdir():
223 layerconf = findConfigFile("bblayers.conf", d) 223 layerconf = findConfigFile("bblayers.conf", d)
224 if layerconf: 224 if layerconf:
225 return os.path.dirname(os.path.dirname(layerconf)) 225 return os.path.dirname(os.path.dirname(layerconf))
226 if bbpath: 226
227 bitbakeconf = bb.utils.which(bbpath, "conf/bitbake.conf") 227 return os.path.abspath(os.getcwd())
228 if bitbakeconf:
229 return os.path.dirname(os.path.dirname(bitbakeconf))
230 return None
231 228
232class CookerDataBuilder(object): 229class CookerDataBuilder(object):
233 230
@@ -417,6 +414,9 @@ class CookerDataBuilder(object):
417 " invoked bitbake from the wrong directory?") 414 " invoked bitbake from the wrong directory?")
418 raise SystemExit(msg) 415 raise SystemExit(msg)
419 416
417 if not data.getVar("TOPDIR"):
418 data.setVar("TOPDIR", os.path.abspath(os.getcwd()))
419
420 data = parse_config_file(os.path.join("conf", "bitbake.conf"), data) 420 data = parse_config_file(os.path.join("conf", "bitbake.conf"), data)
421 421
422 # Parse files for loading *after* bitbake.conf and any includes 422 # Parse files for loading *after* bitbake.conf and any includes