From eef7fbea2c5bf59369390be4d5efa915591b7b22 Mon Sep 17 00:00:00 2001 From: Frederic Martinsons Date: Thu, 16 Mar 2023 13:12:47 +0100 Subject: cargo-update-recipe-crates: generate checksum for each crates This is related to checksum verification introduction from https://patchwork.yoctoproject.org/project/bitbake/patch/20230315131513.50635-1-frederic.martinsons@gmail.com/ I also choose to raise an exception if: - no crates can be found - no Cargo.lock file exist Otherwise the generated inc file will silently be emptied. (From OE-Core rev: c75b924a3de02625aa90ad4db4403f00d1ffeba2) Signed-off-by: Frederic Martinsons Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- .../cargo-update-recipe-crates.bbclass | 44 ++++++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/cargo-update-recipe-crates.bbclass b/meta/classes-recipe/cargo-update-recipe-crates.bbclass index 697460d215..daa363b0dd 100644 --- a/meta/classes-recipe/cargo-update-recipe-crates.bbclass +++ b/meta/classes-recipe/cargo-update-recipe-crates.bbclass @@ -16,11 +16,14 @@ addtask do_update_crates after do_patch 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" # The directory where to search for Cargo.lock files CARGO_LOCK_SRC_DIR ??= "${S}" do_update_crates() { + TARGET_FILE="${THISDIR}/${BPN}-crates.inc" + nativepython3 - <