]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
build-sysroots: Add sysroot tasks to default build and remove warning
authorAdrian Freihofer <adrian.freihofer@siemens.com>
Fri, 30 Jan 2026 07:52:32 +0000 (08:52 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 3 Feb 2026 09:54:30 +0000 (09:54 +0000)
Add both do_build_native_sysroot and do_build_target_sysroot to the
do_build dependency chain, allowing "bitbake build-sysroots" to populate
both sysroots automatically.

This is now safe to do since the previous commit added lockfiles to
serialize these tasks, preventing the race condition where they could
interfere with each other when run concurrently.

Remove the do_build_warn task which instructed users to call the tasks
explicitly, as this is no longer necessary. The warning was not clear.
For somebody who knwos about the race condition, it was obvious that
they should call the tasks explicitly, but for all other users this
was just confusing.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/meta/build-sysroots.bb

index 3ee95658620ddf7712cd7910856ca845176c4d23..c094b8ae532236592727c69f2a95aaebddf227ad 100644 (file)
@@ -19,14 +19,6 @@ deltask install
 deltask populate_sysroot
 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")
@@ -37,7 +29,7 @@ python do_build_native_sysroot () {
 do_build_native_sysroot[cleandirs] = "${STANDALONE_SYSROOT_NATIVE}"
 do_build_native_sysroot[nostamp] = "1"
 do_build_native_sysroot[lockfiles] = "${WORKDIR}/build-sysroots.lock"
-addtask do_build_native_sysroot
+addtask do_build_native_sysroot before do_build
 
 python do_build_target_sysroot () {
     targetsysroot = d.getVar("STANDALONE_SYSROOT")
@@ -49,6 +41,6 @@ python do_build_target_sysroot () {
 do_build_target_sysroot[cleandirs] = "${STANDALONE_SYSROOT}"
 do_build_target_sysroot[nostamp] = "1"
 do_build_target_sysroot[lockfiles] = "${WORKDIR}/build-sysroots.lock"
-addtask do_build_target_sysroot
+addtask do_build_target_sysroot before do_build
 
 do_clean[cleandirs] += "${STANDALONE_SYSROOT} ${STANDALONE_SYSROOT_NATIVE}"