All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cookerdata: Set TOPDIR when using bblayers.conf
@ 2013-08-29 13:26 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2013-08-29 13:26 UTC (permalink / raw)
  To: bitbake-devel

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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index a0379cf..8a0bc22 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()




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-29 13:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 13:26 [PATCH] cookerdata: Set TOPDIR when using bblayers.conf Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.