diff mbox series

[2/2] build-sysroots: Add sysroot tasks to default build and remove warning

Message ID 20260130075333.940897-3-adrian.freihofer@siemens.com
State New
Headers show
Series fix bug 16135 - useradd/groupadd debug output includes PATH | expand

Commit Message

AdrianF Jan. 30, 2026, 7:52 a.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

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>
---
 meta/recipes-core/meta/build-sysroots.bb | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/meta/build-sysroots.bb b/meta/recipes-core/meta/build-sysroots.bb
index 3ee9565862..c094b8ae53 100644
--- a/meta/recipes-core/meta/build-sysroots.bb
+++ b/meta/recipes-core/meta/build-sysroots.bb
@@ -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}"