rust: Minor formatting fix on available Rust version.
From: Christian Kujau
Date: Wed Mar 15 2023 - 16:45:37 EST
In Fedora (and possibly other distributions too) rustc is versioned as:
$ rustc --version
rustc 1.67.1 (d5a82bbd2 2023-02-07) (Fedora 1.67.1-1.fc37)
This makes "make rustavailable" report the version twice:
*** Rust compiler 'rustc' is too new. This may or may not work.
*** Your version: 1.67.1
1.67.1
*** Expected version: 1.62.0
Fix that by only reporting the first version number.
Signed-off-by: Christian Kujau <lists@xxxxxxxxxxxxxxx>
---
diff --git a/scripts/rust_is_available.sh b/scripts/rust_is_available.sh
index aebbf1913970..6b5d25e36538 100755
--- a/scripts/rust_is_available.sh
+++ b/scripts/rust_is_available.sh
@@ -46,8 +46,8 @@ fi
# Non-stable and distributions' versions may have a version suffix, e.g. `-dev`.
rust_compiler_version=$( \
LC_ALL=C "$RUSTC" --version 2>/dev/null \
- | head -n 1 \
| grep -oE '[0-9]+\.[0-9]+\.[0-9]+' \
+ | head -n 1
)
rust_compiler_min_version=$($min_tool_version rustc)
rust_compiler_cversion=$(get_canonical_version $rust_compiler_version)
--
BOFH excuse #398:
Data for intranet got routed through the extranet and landed on the internet.