diff mbox series

[v5,1/4] classes/cargo-update-recipe-crates: use bb.warn() instead of print()

Message ID 20261201-mfe-multi-cargo-lock-files-v5-1-6c4eae24ec27@pengutronix.de
State New
Headers show
Series Add support for multi Cargo.lock files | expand

Commit Message

Marco Felsch Dec. 1, 2026, 4:21 p.m. UTC
The do_update_crates task is a regular python task since commit
d56fb40b32c1 ("classes/cargo-update-recipe-crates: use tomllib
directly"), so the print() output only ends up in the task log and is
neither shown on the console nor counted in the warning summary. Make
use of bb.warn() to fix this.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 meta/classes-recipe/cargo-update-recipe-crates.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/cargo-update-recipe-crates.bbclass b/meta/classes-recipe/cargo-update-recipe-crates.bbclass
index 0767b566ee287d11dc2e1e6d0aeea0a0d3b225b8..d4318bc9f5749503cb7995927e2e54b9771a6b75 100644
--- a/meta/classes-recipe/cargo-update-recipe-crates.bbclass
+++ b/meta/classes-recipe/cargo-update-recipe-crates.bbclass
@@ -40,7 +40,7 @@  python do_update_crates() {
         crates_candidates = list(filter(lambda c: 'crates.io' in c.get('source', ''), crates['package']))
 
         if not crates_candidates:
-            print("WARNING: Unable to find any candidate crates that use crates.io")
+            bb.warn("Unable to find any candidate crates that use crates.io")
             return None
 
         # Update crates uri and their checksum, to avoid name clashing on the checksum