summaryrefslogtreecommitdiffstats
path: root/scripts/devtool
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-09-23 11:05:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-24 17:54:24 +0100
commit85d8b4a92fc7873a458a92a7d409bf73ff25c23b (patch)
tree3838e0d702ccde9b384ffca862723d14d679ea55 /scripts/devtool
parent6363a95550c1b78f8d9788de8b1d2cea7b06837a (diff)
downloadpoky-85d8b4a92fc7873a458a92a7d409bf73ff25c23b.tar.gz
devtool: second fix for running from a different directory
Do not change change current working directory permanently, but, only for the duration of tinfoil initialization instead. The previous fix caused very unintuitive behavior where using relative paths were solved with respect to the builddir instead of the current working directory. E.g. calling "devtool extract zlib ./zlib" would always create create srctree in ${TOPDIR}/zlib, independent of the users cwd. (From OE-Core rev: 4c7f159b0e17a0475a4a4e9dc4dd012e3d2e6a1f) (From OE-Core rev: 05060699e63cd25d089e83e9aa56c11d5baa8fd8) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/devtool')
-rwxr-xr-xscripts/devtool5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/devtool b/scripts/devtool
index 87df951dc1..e4d9db301a 100755
--- a/scripts/devtool
+++ b/scripts/devtool
@@ -221,9 +221,6 @@ def main():
221 if not config.read(): 221 if not config.read():
222 return -1 222 return -1
223 223
224 # We need to be in this directory or we won't be able to initialise tinfoil
225 os.chdir(basepath)
226
227 bitbake_subdir = config.get('General', 'bitbake_subdir', '') 224 bitbake_subdir = config.get('General', 'bitbake_subdir', '')
228 if bitbake_subdir: 225 if bitbake_subdir:
229 # Normally set for use within the SDK 226 # Normally set for use within the SDK
@@ -244,7 +241,7 @@ def main():
244 scriptutils.logger_setup_color(logger, global_args.color) 241 scriptutils.logger_setup_color(logger, global_args.color)
245 242
246 if global_args.bbpath is None: 243 if global_args.bbpath is None:
247 tinfoil = setup_tinfoil(config_only=True) 244 tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
248 global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True) 245 global_args.bbpath = tinfoil.config_data.getVar('BBPATH', True)
249 else: 246 else:
250 tinfoil = None 247 tinfoil = None