]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
classes/cargo: consolidate dependencies
authorRoss Burton <ross.burton@arm.com>
Tue, 4 Aug 2026 16:57:58 +0000 (17:57 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Aug 2026 10:13:16 +0000 (11:13 +0100)
Move the dependencies from cargo to cargo_common: if cargo is being used
in any way then you need to depend on cargo-native.

Inherit rust instead of rust-common or rust-target-config: rust inherits
rust-common that inherits rust-target-config, and rust.bbclass simply
adds the dependency on rust-native. This means we can drop the explicit
rust dependencies to avoid duplication.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/cargo.bbclass
meta/classes-recipe/cargo_common.bbclass

index 31e655650cce14d0e3a62c3c71d391a891587956..628dbc98f18b24ab6e8813337b2b88edeb037990 100644 (file)
 ## Cargo.
 
 inherit cargo_common
-inherit rust-target-config
 
 # the binary we will use
 CARGO = "cargo"
 
-# We need cargo to compile for the target
-BASEDEPENDS:append = " cargo-native"
-
-# Ensure we get the right rust variant
-DEPENDS:append:class-target = " rust-native ${RUSTLIB_DEP}"
-DEPENDS:append:class-nativesdk = " rust-native ${RUSTLIB_DEP}"
-DEPENDS:append:class-native = " rust-native"
-
 # Enable build separation
 B = "${WORKDIR}/build"
 
index 0fb6844d932fe96a5bba8f85337d54d7edf4115d..f58bd80728c37b7a826a4bc2a14004038dc78aed 100644 (file)
@@ -15,7 +15,9 @@
 ##
 
 # add crate fetch support
-inherit rust-common
+inherit rust
+
+BASEDEPENDS:append = " cargo-native"
 
 # In case something fails in the build process, give a bit more feedback on
 # where the issue occured