mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
build-sysroots: target or native sysroot population need to be selected explicitly
Running them in parallel is prone to races as postinsts from target sysroots rely on executables from native sysroots which may or may not be fully prepared yet. This was observed for example here: https://autobuilder.yoctoproject.org/typhoon/#/builders/146/builds/468/steps/12/logs/stdio https://autobuilder.yoctoproject.org/typhoon/#/builders/147/builds/467/steps/12/logs/stdio (From OE-Core rev: 38d7a2e45b883cf999a86af05bcc0eaa875bb47c) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
560a70a198
commit
63e53fb8b6
|
@ -71,7 +71,7 @@ def main():
|
|||
|
||||
ret = run_command_interruptible('BB_SETSCENE_ENFORCE=1 bitbake --quiet %s' % ' '.join(sdk_targets))
|
||||
if not ret:
|
||||
ret = run_command_interruptible('bitbake --quiet build-sysroots')
|
||||
ret = run_command_interruptible('bitbake --quiet build-sysroots -c build_native_sysroot && bitbake --quiet build-sysroots -c build_target_sysroot')
|
||||
lastlog = get_last_consolelog()
|
||||
if lastlog:
|
||||
with open(lastlog, 'r') as f:
|
||||
|
|
|
@ -18,7 +18,8 @@ class MetaIDE(OESelftestTestCase):
|
|||
def setUpClass(cls):
|
||||
super(MetaIDE, cls).setUpClass()
|
||||
bitbake('meta-ide-support')
|
||||
bitbake('build-sysroots')
|
||||
bitbake('build-sysroots -c build_native_sysroot')
|
||||
bitbake('build-sysroots -c build_target_sysroot')
|
||||
bb_vars = get_bb_vars(['MULTIMACH_TARGET_SYS', 'DEPLOY_DIR_IMAGE', 'COREBASE'])
|
||||
cls.environment_script = 'environment-setup-%s' % bb_vars['MULTIMACH_TARGET_SYS']
|
||||
cls.deploydir = bb_vars['DEPLOY_DIR_IMAGE']
|
||||
|
@ -55,5 +56,5 @@ class MetaIDE(OESelftestTestCase):
|
|||
|
||||
def test_meta_ide_can_run_sdk_tests(self):
|
||||
bitbake('-c populate_sysroot gtk+3')
|
||||
bitbake('build-sysroots')
|
||||
bitbake('build-sysroots -c build_target_sysroot')
|
||||
bitbake('-c testsdk meta-ide-support')
|
||||
|
|
|
@ -22,6 +22,14 @@ deltask collect_spdx_deps
|
|||
deltask create_runtime_spdx
|
||||
deltask recipe_qa
|
||||
|
||||
do_build_warn () {
|
||||
bbwarn "Native or target sysroot population needs to be explicitly selected; please use
|
||||
bitbake -c build_native_sysroot build-sysroots
|
||||
bitbake -c build_target_sysroot build-sysroots
|
||||
or both."
|
||||
}
|
||||
addtask do_build_warn before do_build
|
||||
|
||||
python do_build_native_sysroot () {
|
||||
targetsysroot = d.getVar("STANDALONE_SYSROOT")
|
||||
nativesysroot = d.getVar("STANDALONE_SYSROOT_NATIVE")
|
||||
|
@ -31,7 +39,7 @@ python do_build_native_sysroot () {
|
|||
}
|
||||
do_build_native_sysroot[cleandirs] = "${STANDALONE_SYSROOT_NATIVE}"
|
||||
do_build_native_sysroot[nostamp] = "1"
|
||||
addtask do_build_native_sysroot before do_build
|
||||
addtask do_build_native_sysroot
|
||||
|
||||
python do_build_target_sysroot () {
|
||||
targetsysroot = d.getVar("STANDALONE_SYSROOT")
|
||||
|
@ -42,6 +50,6 @@ python do_build_target_sysroot () {
|
|||
}
|
||||
do_build_target_sysroot[cleandirs] = "${STANDALONE_SYSROOT}"
|
||||
do_build_target_sysroot[nostamp] = "1"
|
||||
addtask do_build_target_sysroot before do_build
|
||||
addtask do_build_target_sysroot
|
||||
|
||||
do_clean[cleandirs] += "${STANDALONE_SYSROOT} ${STANDALONE_SYSROOT_NATIVE}"
|
||||
|
|
|
@ -300,7 +300,8 @@ def sdk_install(args, config, basepath, workspace):
|
|||
return 2
|
||||
|
||||
try:
|
||||
exec_build_env_command(config.init_path, basepath, 'bitbake build-sysroots', watch=True)
|
||||
exec_build_env_command(config.init_path, basepath, 'bitbake build-sysroots -c build_native_sysroot', watch=True)
|
||||
exec_build_env_command(config.init_path, basepath, 'bitbake build-sysroots -c build_target_sysroot', watch=True)
|
||||
except bb.process.ExecutionError as e:
|
||||
raise DevtoolError('Failed to bitbake build-sysroots:\n%s' % (str(e)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user