← Back to issue list

Rust plugin always installs the rustup snap, even when trying to use local cargo/rustc

View original Github issue

Metadata

Project
craft-parts
Number
#890
Type
issue
State
closed
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Closed without a fix. No PR or workaround was provided, indicating the report was likely abandoned. The Rust plugin continues to unconditionally install the rustup snap regardless of local toolchain configurations.

Suggested action:

No scores available.

Issue body

### Bug Description Rustup always gets installed, even if we're trying to use local `cargo` and `rustc` installed from another part. ### To Reproduce Build with the following part ### part yaml ```shell parts: rust-deps: plugin: nil build-packages: - librust-indexmap-dev - librust-itoa-dev - librust-memchr-dev - librust-ryu-dev - librust-serde-dev - cargo - cargo-1.80 override-pull: | ln -s /bin/cargo-1.80 /usr/local/bin/cargo ln -s /bin/rustc-1.80 /usr/local/bin/rustc librust-serde-json: plugin: rust after: [rust-deps] source: . ``` ### Relevant log output ```shell 2024-10-30 11:05:38.942 :: 2024-10-30 11:05:00.918 Initialising lifecycle 2024-10-30 11:05:38.942 :: 2024-10-30 11:05:00.918 part build packages: ['librust-indexmap-dev', 'librust-itoa-dev', 'librust-memchr-dev', 'librust-ryu-dev', 'librust-serde-dev', 'cargo', 'cargo-1.80'] 2024-10-30 11:05:38.942 :: 2024-10-30 11:05:00.918 ignore patterns: [] 2024-10-30 11:05:38.942 :: 2024-10-30 11:05:00.918 plugin build packages: {'gcc', 'pkg-config', 'curl', 'git', 'findutils'} 2024-10-30 11:05:38.942 :: 2024-10-30 11:05:00.919 plugin build snaps: {'rustup'} 2024-10-30 11:05:38.942 :: 2024-10-30 11:05:00.919 Installing build-packages 2024-10-30 11:05:38.942 :: 2024-10-30 11:05:00.919 Requested build-packages: ['cargo', 'cargo-1.80', 'curl', 'findutils', 'gcc', 'git', 'librust-indexmap-dev', 'librust-itoa-dev', 'librust-memchr-dev', 'librust-ryu-dev', 'librust-serde-dev', 'pkg-config'] <snip> 2024-10-30 11:05:38.945 :: 2024-10-30 11:05:29.870 Installing build-snaps 2024-10-30 11:05:38.945 :: 2024-10-30 11:05:30.141 Installing snap: rustup 2024-10-30 11:05:38.945 :: 2024-10-30 11:05:32.887 verify plugin environment for part 'rust-deps' 2024-10-30 11:05:38.945 :: 2024-10-30 11:05:32.890 verify plugin environment for part 'librust-serde-json' 2024-10-30 11:05:38.945 :: 2024-10-30 11:05:32.890 plugin validation environment: # Environment 2024-10-30 11:05:38.945 :: ## Application environment 2024-10-30 11:05:38.945 :: ## Part environment 2024-10-30 11:05:38.945 :: export CRAFT_ARCH_TRIPLET="x86_64-linux-gnu" 2024-10-30 11:05:38.945 :: export CRAFT_TARGET_ARCH="amd64" 2024-10-30 11:05:38.945 :: export CRAFT_ARCH_BUILD_ON="amd64" 2024-10-30 11:05:38.945 :: export CRAFT_ARCH_BUILD_FOR="amd64" 2024-10-30 11:05:38.945 :: export CRAFT_ARCH_TRIPLET_BUILD_ON="x86_64-linux-gnu" 2024-10-30 11:05:38.945 :: export CRAFT_ARCH_TRIPLET_BUILD_FOR="x86_64-linux-gnu" 2024-10-30 11:05:38.945 :: export CRAFT_PARALLEL_BUILD_COUNT="16" 2024-10-30 11:05:38.945 :: export CRAFT_PROJECT_DIR="/root/project" 2024-10-30 11:05:38.945 :: export CRAFT_STAGE="/root/stage" 2024-10-30 11:05:38.945 :: export CRAFT_PRIME="/root/prime" 2024-10-30 11:05:38.945 :: export CRAFT_PART_NAME="librust-serde-json" 2024-10-30 11:05:38.945 :: export CRAFT_STEP_NAME="BUILD" 2024-10-30 11:05:38.945 :: export CRAFT_PART_SRC="/root/parts/librust-serde-json/src" 2024-10-30 11:05:38.945 :: export CRAFT_PART_SRC_WORK="/root/parts/librust-serde-json/src" 2024-10-30 11:05:38.945 :: export CRAFT_PART_BUILD="/root/parts/librust-serde-json/build" 2024-10-30 11:05:38.945 :: export CRAFT_PART_BUILD_WORK="/root/parts/librust-serde-json/build" 2024-10-30 11:05:38.945 :: export CRAFT_PART_INSTALL="/root/parts/librust-serde-json/install" 2024-10-30 11:05:38.945 :: ## Plugin environment 2024-10-30 11:05:38.945 :: export PATH="${HOME}/.cargo/bin:${PATH}" 2024-10-30 11:05:38.945 :: ## User environment 2024-10-30 11:05:38.945 :: 2024-10-30 11:05:32.890 plugin validation command: 'cargo --version' 2024-10-30 11:05:38.945 :: 2024-10-30 11:05:33.068 Environment validation failed for part 'librust-serde-json': 'cargo' failed with error code 1. ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without a fix. No PR or workaround was provided, indicating the report was likely abandoned. The Rust plugin continues to unconditionally install the rustup snap regardless of local toolchain configurations.
qwen/qwen3.6-35b-a3b Closed without resolution. The Rust plugin unconditionally installs the rustup snap despite local cargo and rustc being available. No fix or merge was implemented, leaving the bug unresolved.
qwen/qwen3.6-35b-a3b Unresolved. The Rust plugin forces rustup snap installation even when local cargo and rustc are provided. Closed without a fix or follow-up after a maintainer ping to assign the bug.
qwen3.6-35b-a3b-mtp-q6 Closed without resolution. The Rust plugin forces rustup snap installation even when local cargo/rustc are provided. No fix or PR was submitted, and the issue appears abandoned.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1467 rust plugin: new rustup snapcraft closed Closed without resolution or comments, likely abandoned or superseded by subsequent snapcraft updates. No merge details or discussion were provided.
72%