diff mbox series

[v2,2/5] cargo-update-recipe-crates: add RECIPE_UPDATE_EXTRA_TASKS

Message ID 850df47dfd1844e24a6013aa88c32c1b7911bb3c.1718120117.git.tim.orling@konsulko.com
State New
Headers show
Series [v2,1/5] devtool upgrade: enable RECIPE_UPDATE_EXTRA_TASKS | expand

Commit Message

Tim Orling June 11, 2024, 3:55 p.m. UTC
From: Tim Orling <tim.orling@konsulko.com>

When we upgrade a recipe that inherits cargo-update-recipe-crates and
the upstream Cargo.toml/Cargo.lock have been changed, we need to run
the update_crates task or else the devtool upgrade (and therefore
AUH upgrade) will fail.

Add "do_update_crates" task to RECIPE_UPDATE_EXTRA_TASKS for all
recipes that inherit this class.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
No changes in v2

 meta/classes-recipe/cargo-update-recipe-crates.bbclass | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ross Burton June 12, 2024, 2:44 p.m. UTC | #1
> On 11 Jun 2024, at 16:55, Tim Orling via lists.openembedded.org <tim.orling=konsulko.com@lists.openembedded.org> wrote:
> +RECIPE_UPDATE_EXTRA_TASKS:${PN} += "do_update_crates"

Why the ${PN}?  It’s not like you’d have RECIPE_UPDATE_EXTRA_TASKS:${PN}-doc.

Ross
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 8980137d02c..a405951f4b5 100644
--- a/meta/classes-recipe/cargo-update-recipe-crates.bbclass
+++ b/meta/classes-recipe/cargo-update-recipe-crates.bbclass
@@ -18,6 +18,8 @@  do_update_crates[depends] = "python3-native:do_populate_sysroot"
 do_update_crates[nostamp] = "1"
 do_update_crates[doc] = "Update the recipe by reading Cargo.lock and write in ${THISDIR}/${BPN}-crates.inc"
 
+RECIPE_UPDATE_EXTRA_TASKS:${PN} += "do_update_crates"
+
 # The directory where to search for Cargo.lock files
 CARGO_LOCK_SRC_DIR ??= "${S}"