From patchwork Thu Dec 7 13:39:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 35848 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2B36C4167B for ; Thu, 7 Dec 2023 13:41:06 +0000 (UTC) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.web11.83813.1701956464518655080 for ; Thu, 07 Dec 2023 05:41:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D5Uc3tgj; spf=pass (domain: gmail.com, ip: 209.85.221.50, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-33330a5617fso961146f8f.2 for ; Thu, 07 Dec 2023 05:41:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701956462; x=1702561262; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1ZC2eKoUBtAnlycMMWQPdh+90/0JVJDvO9k3iMsMsbk=; b=D5Uc3tgj5rL+UZpNvJZXLjhUVknjbS4iGGBwM2Y8vN0hWKT1ck3YVllxGCogcWHmWv ATJuDjFwDaRNY7wkPkrRzVOrKeTdHK5V7vB2mEAomdzdpIcg5qfsqNN8G8eUKdbyOYZY MGKV7YTY58cVmIc8NkFbAWmH2b9r2SPVuxPzIoXgy+YZTwu07JzxeDB4u9snQoQs/b0y us0b1UhF0h18ESTqAQ4uV3NfL369nOHMJ3w8Q09wsU8LkhuOl52jW7qK9Txmid0hMu1h 38pI2BusPb9l/AriXyU+VavPa86e34Ao2BUf6y590gJ5Pb6qOV9XqVeXjI9zmYdvXkss 9NXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701956462; x=1702561262; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1ZC2eKoUBtAnlycMMWQPdh+90/0JVJDvO9k3iMsMsbk=; b=PXImFExRhxhNpfSgNfK4phX9EO8pnIf0yDe1TfiHwcHW7xDvKqbJozZSZ0nEk9ji0P IVjs1bBOXSEASDUIRk4k0bCIs41Kc72s9hnifSctqljQAI9lRRKPv3ro/TdD76cRCLRn Xfw7SylX0hjTG/CL+C9Z9nzFaZaSJ4yHZeCPmhU2e3H+hjpgxEBQE8MR7uSQG9qeALcQ 9oqinVhj5Ey/Iq+F/7QA8NzWJ3os+njvhk564RCQT8jWZXUApzBZ3Uei+7zCe3nymvJW sXC9iFFKMPPol5RYWX66q+dBsx8SiTuKZ9Cx4mYHs9IU5S844xxL2m2/veGLrSrpQxt6 CcSQ== X-Gm-Message-State: AOJu0Yx/doGvEPM/IvzdsIzMXERI2mqgtockWma4siAaskMjlI9nX+xu DczGJFLWX53CCItEpZQSLznG1WiUvH8= X-Google-Smtp-Source: AGHT+IEh3lePWUDmcWPdixi1z3XGHpDAJeHM1VE1ZyKvXGyBmQCKAMOneeMtTL2oB3FWPXsQ0HzeqQ== X-Received: by 2002:a05:6000:1012:b0:333:40ae:d71f with SMTP id a18-20020a056000101200b0033340aed71fmr1499672wrx.123.1701956462076; Thu, 07 Dec 2023 05:41:02 -0800 (PST) Received: from localhost.localdomain ([5.148.102.211]) by smtp.gmail.com with ESMTPSA id a4-20020a5d53c4000000b003333dd777a4sm1470312wrw.46.2023.12.07.05.41.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 05:41:01 -0800 (PST) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [OE-Core][PATCH 1/3] cargo: Rename MANIFEST_PATH -> CARGO_MANIFEST_PATH Date: Thu, 7 Dec 2023 13:39:11 +0000 Message-Id: <20231207133913.443-1-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 07 Dec 2023 13:41:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191954 This variable is a piece of recipe configurable interface, scope it with the class name to make that clear. Signed-off-by: Alex Kiernan --- meta/classes-recipe/cargo.bbclass | 4 ++-- meta/classes-recipe/cargo_common.bbclass | 2 +- meta/classes-recipe/ptest-cargo.bbclass | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 8c0b92df8d33..96a74e2ef1ec 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass @@ -35,7 +35,7 @@ export RUST_BACKTRACE = "1" CARGO_SRC_DIR ??= "" # The actual path to the Cargo.toml -MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" +CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" RUSTFLAGS ??= "" BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" @@ -44,7 +44,7 @@ BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" # and will require an up to date Cargo.lock file. # This force the package being built to already ship a Cargo.lock, in the end # this is what we want, at least, for reproducibility of the build. -CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" +CARGO_BUILD_FLAGS = "-v --frozen --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${CARGO_MANIFEST_PATH}" # This is based on the content of CARGO_BUILD_FLAGS and generally will need to # change if CARGO_BUILD_FLAGS changes. diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index b732a1bd9538..bf298e96c745 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -161,7 +161,7 @@ python cargo_common_do_patch_paths() { # here is better than letting cargo tell (in case the file is missing) # "Cargo.lock should be modified but --frozen was given" - manifest_path = d.getVar("MANIFEST_PATH", True) + manifest_path = d.getVar("CARGO_MANIFEST_PATH", True) lockfile = os.path.join(os.path.dirname(manifest_path), "Cargo.lock") if not os.path.exists(lockfile): bb.fatal(f"{lockfile} file doesn't exist") diff --git a/meta/classes-recipe/ptest-cargo.bbclass b/meta/classes-recipe/ptest-cargo.bbclass index ff57be852508..c46df362bfee 100644 --- a/meta/classes-recipe/ptest-cargo.bbclass +++ b/meta/classes-recipe/ptest-cargo.bbclass @@ -15,7 +15,7 @@ python do_compile_ptest_cargo() { cargo = bb.utils.which(d.getVar("PATH"), d.getVar("CARGO", True)) cargo_build_flags = d.getVar("CARGO_BUILD_FLAGS", True) rust_flags = d.getVar("RUSTFLAGS", True) - manifest_path = d.getVar("MANIFEST_PATH", True) + manifest_path = d.getVar("CARGO_MANIFEST_PATH", True) project_manifest_path = os.path.normpath(manifest_path) manifest_dir = os.path.dirname(manifest_path) From patchwork Thu Dec 7 13:39:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 35849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06CDFC10F05 for ; Thu, 7 Dec 2023 13:41:07 +0000 (UTC) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.groups.io with SMTP id smtpd.web11.83814.1701956465287664396 for ; Thu, 07 Dec 2023 05:41:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YYv8oAtN; spf=pass (domain: gmail.com, ip: 209.85.221.47, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3333fbbeab9so883377f8f.2 for ; Thu, 07 Dec 2023 05:41:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701956463; x=1702561263; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UCwFnVhPNgOGWD6hUJQPBXN4gEzQIJMLtm391gAWpqU=; b=YYv8oAtNc7lujzncsgtaHQPPf7vNJ5UG7o0xAKqi51jl24j1uamatH3YdDsGCdnKNX m2lIy/WdS3jBiNlwarouls88IvKDJMdVvQI7NAql7soHjFzfRGsEbOJKA6DH8Kdo8KhA +zTU3vabHZYfVQUdUrMAA+TjrbeZFyoNnGc/YUK5eGWNvJQoXumJnm29sXHwVmeQ35C4 RP/XkuCGJE/tCzukhFNeIPW0pDPdmt84nY4+DdzxcCu9+lqCLxPpwymWfwelrDMoJtLH xynaiV2XltLAeo0MjHYUpi4ANIdlxWbdniz78fRuP/Pzd7hiK9vsUREih9ggeB5CBhdq 0ltA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701956463; x=1702561263; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UCwFnVhPNgOGWD6hUJQPBXN4gEzQIJMLtm391gAWpqU=; b=GvSvvHtwKBd55ykzAd7eGNA+OHhnP/5akqLvFs60ikZB+4AIIznATBlVLZ6A+zJGvi o++7PXuSWF7w0tWAubqNL2jDzXQKL5dozhIywDqceqLwGteLZ/BaUDXAQ7CIlXdElkWz MsCCLVi/TFvsR+Jx8Nk2rOeKSYEa1ClXDHHBilx49Qvpz6v+MPSpfZlFTc1o8BmsR5q4 ZKfWVtitdurkKHw456dQueSg0WO6bR96bbAlAhk7Qfq/Ohw2PmCTsmIHFr2+zCmRUozE 0Gv3mYoKIlLq0mKrM36ZgQcvOV2IoOgTwjmFtXd0cn8D3/6e4nEacHSb7R//R3rkj07L HkVw== X-Gm-Message-State: AOJu0Yw7wN4NSnHepwXWwkR9sEM52dGiACEJLchMFkun7ZEq3KQ73zqa NP3d3dSMsc/F7u9FbXbWyHVbOwNWC6U= X-Google-Smtp-Source: AGHT+IEYIGmOXtDe/bJYzIUXwEgRImVXYaPRoA8cFBGHmlZYEvj1eTtaI1dxmvj5Q1fT//ATsV1JHA== X-Received: by 2002:adf:f306:0:b0:333:529b:e71 with SMTP id i6-20020adff306000000b00333529b0e71mr1503919wro.83.1701956462610; Thu, 07 Dec 2023 05:41:02 -0800 (PST) Received: from localhost.localdomain ([5.148.102.211]) by smtp.gmail.com with ESMTPSA id a4-20020a5d53c4000000b003333dd777a4sm1470312wrw.46.2023.12.07.05.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 05:41:02 -0800 (PST) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [OE-Core][PATCH 2/3] cargo: Move CARGO_MANIFEST_PATH/CARGO_SRC_DIR to cargo_common Date: Thu, 7 Dec 2023 13:39:12 +0000 Message-Id: <20231207133913.443-2-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20231207133913.443-1-alex.kiernan@gmail.com> References: <20231207133913.443-1-alex.kiernan@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 07 Dec 2023 13:41:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191955 cargo_common_do_configure uses CARGO_MANIFEST_PATH (which depends on CARGO_SRC_DIR), but their definition was in cargo.bbclass. Match the other variables here and change to default values, rather than weak defaults. Signed-off-by: Alex Kiernan --- meta/classes-recipe/cargo.bbclass | 7 ------- meta/classes-recipe/cargo_common.bbclass | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index 96a74e2ef1ec..0829a58dd90f 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass @@ -30,13 +30,6 @@ B = "${WORKDIR}/build" # where the issue occured export RUST_BACKTRACE = "1" -# The directory of the Cargo.toml relative to the root directory, per default -# assume there's a Cargo.toml directly in the root directory -CARGO_SRC_DIR ??= "" - -# The actual path to the Cargo.toml -CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" - RUSTFLAGS ??= "" BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" # --frozen flag will prevent network access (which is required since only diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index bf298e96c745..c330c122a9d3 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -33,6 +33,13 @@ CARGO_DISABLE_BITBAKE_VENDORING ?= "0" # Used by libstd-rs to point to the vendor dir included in rustc src CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake" +# The directory of the Cargo.toml relative to the root directory, per default +# assume there's a Cargo.toml directly in the root directory +CARGO_SRC_DIR ?= "" + +# The actual path to the Cargo.toml +CARGO_MANIFEST_PATH ?= "${S}/${CARGO_SRC_DIR}/Cargo.toml" + CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" cargo_common_do_configure () { mkdir -p ${CARGO_HOME}/bitbake From patchwork Thu Dec 7 13:39:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Kiernan X-Patchwork-Id: 35847 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3E26C46CA3 for ; Thu, 7 Dec 2023 13:41:06 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web11.83815.1701956466057460762 for ; Thu, 07 Dec 2023 05:41:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Fnp1DGyZ; spf=pass (domain: gmail.com, ip: 209.85.221.48, mailfrom: alex.kiernan@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-33340c50af9so943030f8f.3 for ; Thu, 07 Dec 2023 05:41:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701956464; x=1702561264; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2bluCtzrG6MPVdmkKsmp5U75Q81u66Uhs7WGpJldlmc=; b=Fnp1DGyZbnlHNXMBC0+aeBLRxhp9QJB8bTznolgFff/tUycFoknaCyVLVPHRYoYNH1 i9MApUF7C3kOlmiofIzFV39SqQznH4Nz9q5IhdZgp1tzMdPq51pU10cG/jSVy0otsbe9 IL649Kz1KaLJaVUTUmNCY2nHKCGx0kNTliEIVM+7jPf/0v1hyJOMyp1eHT52i7Gup8zK Z7f8ejcneY4M5dqlD51tvqAtkMFMHpzYWOoJ/DlE4LzwEUmULkcKBcVNj5BAEpbn1oQf mVxQLokVZe5ExMK8krcnvZlKKx//KzTUKXETIjL7ThfD1rO9033tF1ED/qIiNzdtSZkn BazA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701956464; x=1702561264; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2bluCtzrG6MPVdmkKsmp5U75Q81u66Uhs7WGpJldlmc=; b=XJwyqoCM7WKpoQJ1YJQQqP2c8Q9Q3pIAjH07KObnaCuyRGA+kqYjFhTd0m0I2Wc2lb uWTsGOs4qOkA/SeXpi5qlgkdhQcD4xqxUQ71r4x/0GSCQ0gilJ0K9CQVjfzw+zvPhNKB 2JodxuqAfliX0raNJ6dfjZs4ENGdNiXJB/f6QXap0KP+8cHvSQlgs/D/RYBEAFuD6HOh X+4s+pI+SJVRjSJdpO3sdnBcg37JIbfueeuRN+LLiIMvDR0uOkMs6Yv2IbSrWYXZeKwp puo6QltTAUaBwhS9tH6u1gEYarFudsVkK90Bv+5Se6lI5nuHVaFsQ+dC9SeWpHjF9yR+ WoYA== X-Gm-Message-State: AOJu0YwFq/8i3n4H/8Mf4bcp/n63ZUJdJ4uVWb9cOU5wWswJDer29a3s B8Z0GlJ+6pjEeXh9o1wBv9DHLkRG/NM= X-Google-Smtp-Source: AGHT+IH/Hhec2OeAoIcWQ8SY7WAGqhYBzTRWN0S3pkt5pTEn+CnLRjN7XmYOtrM2bv1Rsk+s4+GOSA== X-Received: by 2002:a5d:5689:0:b0:333:1adc:a381 with SMTP id f9-20020a5d5689000000b003331adca381mr938383wrv.31.1701956464282; Thu, 07 Dec 2023 05:41:04 -0800 (PST) Received: from localhost.localdomain ([5.148.102.211]) by smtp.gmail.com with ESMTPSA id a4-20020a5d53c4000000b003333dd777a4sm1470312wrw.46.2023.12.07.05.41.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 05:41:02 -0800 (PST) From: Alex Kiernan To: openembedded-core@lists.openembedded.org Cc: Alex Kiernan Subject: [OE-Core][PATCH 3/3] cargo: Add CARGO_LOCK_PATH for path to Cargo.lock Date: Thu, 7 Dec 2023 13:39:13 +0000 Message-Id: <20231207133913.443-3-alex.kiernan@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20231207133913.443-1-alex.kiernan@gmail.com> References: <20231207133913.443-1-alex.kiernan@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 07 Dec 2023 13:41:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191956 When building a workspace enabled project, the Cargo.lock is found at the root of the project, not alongside the Cargo.toml. Expose CARGO_LOCK_PATH so it can be explicitly configured. Signed-off-by: Alex Kiernan --- meta/classes-recipe/cargo_common.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index c330c122a9d3..a236628664c8 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass @@ -40,6 +40,9 @@ CARGO_SRC_DIR ?= "" # The actual path to the Cargo.toml CARGO_MANIFEST_PATH ?= "${S}/${CARGO_SRC_DIR}/Cargo.toml" +# Path to Cargo.lock +CARGO_LOCK_PATH ?= "${@ os.path.join(os.path.dirname(d.getVar('CARGO_MANIFEST_PATH', True)), 'Cargo.lock')}" + CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}" cargo_common_do_configure () { mkdir -p ${CARGO_HOME}/bitbake @@ -168,8 +171,7 @@ python cargo_common_do_patch_paths() { # here is better than letting cargo tell (in case the file is missing) # "Cargo.lock should be modified but --frozen was given" - manifest_path = d.getVar("CARGO_MANIFEST_PATH", True) - lockfile = os.path.join(os.path.dirname(manifest_path), "Cargo.lock") + lockfile = d.getVar("CARGO_LOCK_PATH", True) if not os.path.exists(lockfile): bb.fatal(f"{lockfile} file doesn't exist")