diff options
Diffstat (limited to 'scripts/oe-check-sstate')
-rwxr-xr-x | scripts/oe-check-sstate | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/scripts/oe-check-sstate b/scripts/oe-check-sstate index 8aab86adb3..4187e77458 100755 --- a/scripts/oe-check-sstate +++ b/scripts/oe-check-sstate @@ -5,18 +5,8 @@ # Copyright 2016 Intel Corporation # Authored-by: Paul Eggleton <paul.eggleton@intel.com> # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. +# SPDX-License-Identifier: GPL-2.0-only # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. import sys import os @@ -28,7 +18,6 @@ import re scripts_path = os.path.dirname(os.path.realpath(__file__)) lib_path = scripts_path + '/lib' sys.path = sys.path + [lib_path] -import scriptutils import scriptpath scriptpath.add_bitbake_lib_path() import argparse_oe @@ -40,13 +29,13 @@ def translate_virtualfns(tasks): try: tinfoil.prepare(False) - pkg_fn = tinfoil.cooker.recipecache.pkg_fn + recipecaches = tinfoil.cooker.recipecaches outtasks = [] for task in tasks: - fn, taskname = task.rsplit(':', 1) + (mc, fn, taskname) = bb.runqueue.split_tid(task) if taskname.endswith('_setscene'): taskname = taskname[:-9] - outtasks.append('%s:%s' % (pkg_fn[fn], taskname)) + outtasks.append('%s:%s' % (recipecaches[mc].pkg_fn[fn], taskname)) finally: tinfoil.shutdown() return outtasks @@ -57,15 +46,12 @@ def check(args): try: env = os.environ.copy() if not args.same_tmpdir: - env['BB_ENV_EXTRAWHITE'] = env.get('BB_ENV_EXTRAWHITE', '') + ' TMPDIR_forcevariable' - env['TMPDIR_forcevariable'] = tmpdir + env['BB_ENV_PASSTHROUGH_ADDITIONS'] = env.get('BB_ENV_PASSTHROUGH_ADDITIONS', '') + ' TMPDIR:forcevariable' + env['TMPDIR:forcevariable'] = tmpdir try: - output = subprocess.check_output( - 'bitbake -n %s' % ' '.join(args.target), - stderr=subprocess.STDOUT, - env=env, - shell=True) + cmd = ['bitbake', '--dry-run', '--runall=build'] + args.target + output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env) task_re = re.compile('NOTE: Running setscene task [0-9]+ of [0-9]+ \(([^)]+)\)') tasks = [] |