diff mbox series

[2/3] rust: consolidate rust-llvm dependencies

Message ID 20250521191449.1486927-2-ross.burton@arm.com
State Accepted, archived
Commit ffa699332551fbbb95a0e388385667dc2706da6a
Headers show
Series [1/3] rust: remove python3-native DEPENDS | expand

Commit Message

Ross Burton May 21, 2025, 7:14 p.m. UTC
There's no need to have multiple overrides for this, as BBCLASSEXTEND
will automatically map the dependencies as needed.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-devtools/rust/rust_1.85.1.bb | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Quentin Schulz May 22, 2025, 12:29 p.m. UTC | #1
Hi Ross,

On 5/21/25 9:14 PM, Ross Burton via lists.openembedded.org wrote:
> There's no need to have multiple overrides for this, as BBCLASSEXTEND
> will automatically map the dependencies as needed.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>   meta/recipes-devtools/rust/rust_1.85.1.bb | 7 +------
>   1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/meta/recipes-devtools/rust/rust_1.85.1.bb b/meta/recipes-devtools/rust/rust_1.85.1.bb
> index 583437f1f3e..6411e43c961 100644
> --- a/meta/recipes-devtools/rust/rust_1.85.1.bb
> +++ b/meta/recipes-devtools/rust/rust_1.85.1.bb
> @@ -7,17 +7,12 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9c0fae516fe8aaea2fb601db4800daf7"
>   inherit rust
>   inherit cargo_common
>   
> -DEPENDS += "file-native"
> -DEPENDS:append:class-native = " rust-llvm-native"
> -DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm"
> -
> +DEPENDS += "file-native rust-llvm"
>   # native rust uses cargo/rustc from binary snapshots to bootstrap
>   # but everything else should use our native builds
>   DEPENDS:append:class-target = " cargo-native rust-native"
>   DEPENDS:append:class-nativesdk = " cargo-native rust-native"
>   
> -DEPENDS += "rust-llvm (=${PV})"
> -

We do lose the force version dependency here, would that be an issue?

I assume this would be if we forget to sync rust recipe with rust-llvm 
recipe or if someone decides to port/override only one or the other 
recipe (but then, do we care :) ?)?

Cheers,
Quentin
Alexander Kanavin May 22, 2025, 12:33 p.m. UTC | #2
On Thu, 22 May 2025 at 14:29, Quentin Schulz via
lists.openembedded.org
<quentin.schulz=cherry.de@lists.openembedded.org> wrote:
> > -DEPENDS += "rust-llvm (=${PV})"
> > -
>
> We do lose the force version dependency here, would that be an issue?
>
> I assume this would be if we forget to sync rust recipe with rust-llvm
> recipe or if someone decides to port/override only one or the other
> recipe (but then, do we care :) ?)?

This is already enforced through sharing of rust-sources.inc between
all the rust recipes. They all refer to the same upstream tarball,
with the same checksum.

Alex
Ross Burton May 22, 2025, 12:38 p.m. UTC | #3
On 22 May 2025, at 13:29, Quentin Schulz <quentin.schulz@cherry.de> wrote:
> We do lose the force version dependency here, would that be an issue?

If you can point me at the code that actually checks the versions of DEPENDS then that would be great.

My understand is that they’re parsed, but never handled.

Ross
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/rust_1.85.1.bb b/meta/recipes-devtools/rust/rust_1.85.1.bb
index 583437f1f3e..6411e43c961 100644
--- a/meta/recipes-devtools/rust/rust_1.85.1.bb
+++ b/meta/recipes-devtools/rust/rust_1.85.1.bb
@@ -7,17 +7,12 @@  LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9c0fae516fe8aaea2fb601db4800daf7"
 inherit rust
 inherit cargo_common
 
-DEPENDS += "file-native"
-DEPENDS:append:class-native = " rust-llvm-native"
-DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm"
-
+DEPENDS += "file-native rust-llvm"
 # native rust uses cargo/rustc from binary snapshots to bootstrap
 # but everything else should use our native builds
 DEPENDS:append:class-target = " cargo-native rust-native"
 DEPENDS:append:class-nativesdk = " cargo-native rust-native"
 
-DEPENDS += "rust-llvm (=${PV})"
-
 RDEPENDS:${PN}:append:class-target = " gcc g++ binutils"
 
 # Otherwise we'll depend on what we provide