← Back to issue list

rust plugin crashes when trying to rebuild a snap package

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1825858
Type
issue
State
closed
Author
~shahn
Labels
rust
Created
Updated
Closed

Current evaluation

⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.

Closed without resolution. Rebuilding fails because cargo install lacks the --force flag to overwrite existing binaries, forcing manual cleanup or snapcraft clean between builds.

Suggested action:

No scores available.

Issue body

To reproduce: - create a rust project that will build and install executables (e.g. with `cargo init --bin`) - add a snapcraft.yaml using the rust plugin - run `snapcraft` (this works) - run `snapcraft` again. This fails with: ``` /root/.cargo/bin/cargo +stable install --path /root/parts/scriptkeeper/build --root /root/parts/scriptkeeper/install Installing scriptkeeper v0.1.0 (/root/parts/scriptkeeper/build) error: binary `scriptkeeper` already exists in destination as part of `scriptkeeper v0.1.0 (/root/parts/scriptkeeper/build)` Add --force to overwrite ``` It seems as if the plugin runs `cargo install` on the same virtual machine, but that fails the second time, because `cargo` prevents you from overwriting executables without passing `--force`. `snapcraft clean scriptkeeper` fixes this, but it also means that I have to rebuild the entire project for every little change. Which is annoying when trying to debug the snap file. Here's the project and commit where I'm seeing this: https://github.com/Originate/scriptkeeper/commit/2160eeeada5a44546e743f11a90798c8c19083e5 Using: - snapcraft, version 3.4 - multipass 0.6.0 - multipassd 0.6.0 - Ubuntu 18.10 - base: core18

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without resolution. Rebuilding fails because cargo install lacks the --force flag to overwrite existing binaries, forcing manual cleanup or snapcraft clean between builds.
qwen/qwen3.6-35b-a3b Closed without resolution. The report detailed a Rust plugin failure during snap rebuilds caused by cargo install refusing to overwrite existing binaries. With zero comments and no patch provided, the issue appears abandoned.
qwen3.6-35b-a3b-mtp-q6 Closed without resolution or comments. The rust plugin fails on repeated builds because cargo install lacks --force. The issue appears abandoned or superseded by later updates.

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.
71%