diff mbox series

[2/7] rust: do not run separate build/install steps

Message ID 20230331052636.978578-2-alex@linutronix.de
State Accepted, archived
Commit 7d805f9a9f6b5048308a37a2757d08cca40b1ff3
Headers show
Series [1/7] ffmpeg: update 5.1.2 -> 6.0 | expand

Commit Message

Alexander Kanavin March 31, 2023, 5:26 a.m. UTC
Upstream does not actually use or test it this way; if the goal
is to install items, then install target should be executed directly.

In particular, in latest rust release building stage 2 items has regressed
altogether (incorrect dependencies between rust-analyze tool and the
libs it needs) and no one noticed.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/recipes-devtools/rust/rust_1.67.1.bb | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/rust_1.67.1.bb b/meta/recipes-devtools/rust/rust_1.67.1.bb
index f4c6d9511db..eecb05ae026 100644
--- a/meta/recipes-devtools/rust/rust_1.67.1.bb
+++ b/meta/recipes-devtools/rust/rust_1.67.1.bb
@@ -221,17 +221,6 @@  FILES:${PN} += "${libdir}/*.so"
 FILES:${PN}-dev = ""
 
 do_compile () {
-    rust_runx build --stage 2
-}
-
-do_compile:append:class-target () {
-    rust_runx build --stage 2 src/tools/clippy
-    rust_runx build --stage 2 src/tools/rustfmt
-}
-
-do_compile:append:class-nativesdk () {
-    rust_runx build --stage 2 src/tools/clippy
-    rust_runx build --stage 2 src/tools/rustfmt
 }
 
 ALLOW_EMPTY:${PN} = "1"
@@ -256,6 +245,8 @@  rust_do_install() {
 rust_do_install:class-nativesdk() {
     export PSEUDO_UNLOAD=1
     rust_runx install
+    rust_runx install clippy
+    rust_runx install rustfmt
     unset PSEUDO_UNLOAD
 
     install -d ${D}${bindir}
@@ -274,6 +265,8 @@  EXTRA_TOOLS ?= "cargo-clippy clippy-driver rustfmt"
 rust_do_install:class-target() {
     export PSEUDO_UNLOAD=1
     rust_runx install
+    rust_runx install clippy
+    rust_runx install rustfmt
     unset PSEUDO_UNLOAD
 
     install -d ${D}${bindir}