diff mbox series

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

Message ID 20240612173321.3487735-2-tim.orling@konsulko.com
State New
Headers show
Series [v3,1/5] devtool upgrade: enable RECIPE_UPDATE_EXTRA_TASKS | expand

Commit Message

Tim Orling June 12, 2024, 5:33 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>
---
Changes in v3:
  * Address rburton review comment
  * Since the variable is recipe scoped (as is the class being tested),
    we do not need the :${PN} appended to RECIPE_UPDATE_EXTRA_TASKS

No Changes in v2

 meta/classes-recipe/cargo-update-recipe-crates.bbclass | 2 ++
 1 file changed, 2 insertions(+)
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..a19ce16b467 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 += "do_update_crates"
+
 # The directory where to search for Cargo.lock files
 CARGO_LOCK_SRC_DIR ??= "${S}"