From: Frederic Martinsons Date: Thu, 16 Mar 2023 12:12:47 +0000 (+0100) Subject: cargo-update-recipe-crates: generate checksum for each crates X-Git-Tag: 2023-04-mickledore~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c75b924a3de02625aa90ad4db4403f00d1ffeba2;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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. Signed-off-by: Frederic Martinsons Signed-off-by: Alexandre Belloni --- diff --git a/meta/classes-recipe/cargo-update-recipe-crates.bbclass b/meta/classes-recipe/cargo-update-recipe-crates.bbclass index 697460d215d..daa363b0dd6 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 - <