]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: fix running from a different directory
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 8 Sep 2015 10:39:15 +0000 (11:39 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Sep 2015 13:25:07 +0000 (14:25 +0100)
Fixes the following error when running devtool from a directory other
than the build directory (or the SDK base path when using within the
extensible SDK):

  The BBPATH variable is not set and bitbake did not find a
  conf/bblayers.conf file in the expected location.
  Maybe you accidentally invoked bitbake from the wrong directory?

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/devtool

index b9d3bb9e85e310192fb70a8bcb7e54ee03c8711b..87df951dc130406db2960aec91aa81ea6d57dc99 100755 (executable)
@@ -221,6 +221,9 @@ def main():
     if not config.read():
         return -1
 
+    # We need to be in this directory or we won't be able to initialise tinfoil
+    os.chdir(basepath)
+
     bitbake_subdir = config.get('General', 'bitbake_subdir', '')
     if bitbake_subdir:
         # Normally set for use within the SDK