]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
devtool: runqemu: work around runqemu script path assumption paule/esdk-runqemu-path
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 18 Oct 2016 02:40:37 +0000 (15:40 +1300)
committerPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 18 Oct 2016 02:49:56 +0000 (15:49 +1300)
The new runqemu script assumes that if OECORE_NATIVE_SYSROOT is set then
it shouldn't try to run bitbake to find out the values of various
variables such as DEPLOY_DIR_IMAGE; this assumption is incorrect for the
extensible SDK. To work around this, clear OECORE_NATIVE_SYSROOT in the
environment when running runqemu.

Fixes [YOCTO #10447].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
scripts/lib/devtool/runqemu.py

index 303abcae4f5d6c4127b3f779864a16b1b616e5a4..ae25cee08c546530065bee473c1b6d9fd618115c 100644 (file)
@@ -48,7 +48,12 @@ def runqemu(args, config, basepath, workspace):
         raise DevtoolError('Unable to determine image name to run, please specify one')
 
     try:
-        exec_build_env_command(config.init_path, basepath, 'runqemu %s %s %s' % (machine, imagename, " ".join(args.args)), watch=True)
+        # FIXME runqemu assumes that if OECORE_NATIVE_SYSROOT is set then it shouldn't
+        # run bitbake to find out the values of various environment variables, which
+        # isn't the case for the extensible SDK. Work around it for now.
+        newenv = dict(os.environ)
+        newenv.pop('OECORE_NATIVE_SYSROOT', '')
+        exec_build_env_command(config.init_path, basepath, 'runqemu %s %s %s' % (machine, imagename, " ".join(args.args)), watch=True, env=newenv)
     except bb.process.ExecutionError as e:
         # We've already seen the output since watch=True, so just ensure we return something to the user
         return e.exitcode