From: Richard Purdie Date: Thu, 29 Aug 2013 13:26:53 +0000 (+0100) Subject: bitbake: cookerdata: Set TOPDIR when using bblayers.conf X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7a389729a5453bf090f05946bfa64413a5e04ed;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: cookerdata: Set TOPDIR when using bblayers.conf By definition, bblayers.conf is at the top of the build tree. We'd like to support running bitbake anywhere within that build tree but TOPDIR gets set to wherever cwd is. Change the code to reset TOPDIR to the top of the build directory. This shouldn't break anything but does make the system more usable. (Bitbake rev: b266db27de0bba19a418e4d42e870649136b116b) Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index a0379cf7f34..8a0bc22247d 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py @@ -239,6 +239,9 @@ class CookerDataBuilder(object): layerconf = self._findLayerConf() if layerconf: parselog.debug(2, "Found bblayers.conf (%s)", layerconf) + # By definition bblayers.conf is in conf/ of TOPDIR. + # We may have been called with cwd somewhere else so reset TOPDIR + data.setVar("TOPDIR", os.path.dirname(os.path.dirname(layerconf))) data = parse_config_file(layerconf, data) layers = (data.getVar('BBLAYERS', True) or "").split()