mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-06-21 08:52:27 +02:00
While these messages are useful when debugging, the warnings clutter up the log due to running before our sanity checks, potentially confusing the user. Signed-off-by: Christopher Larson <kergoth@gmail.com>
25 lines
906 B
C++
25 lines
906 B
C++
def external_run(d, cmd, *args):
|
|
import subprocess
|
|
|
|
topdir = d.getVar('TMPDIR', True)
|
|
toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN', True)
|
|
if toolchain_path:
|
|
target_prefix = d.getVar('EXTERNAL_TARGET_SYS', True) + '-'
|
|
path = os.path.join(toolchain_path, 'bin', target_prefix + cmd)
|
|
args = [path] + list(args)
|
|
|
|
try:
|
|
output = oe.path.check_output(args, cwd=topdir, stderr=subprocess.STDOUT)
|
|
except oe.path.CalledProcessError as exc:
|
|
import pipes
|
|
bb.debug(1, "{0} failed: {1}".format(' '.join(pipes.quote(a) for a in args), exc.output))
|
|
except OSError as exc:
|
|
import pipes
|
|
bb.debug(1, "{0} failed: {1}".format(' '.join(pipes.quote(a) for a in args), str(exc)))
|
|
else:
|
|
return output
|
|
|
|
return 'UNKNOWN'
|
|
|
|
external_run[vardepsexclude] += "EXTERNAL_TOOLCHAIN TMPDIR"
|