← Back to issue list

Handle multi-arch builds in destructive mode

View original Github issue

Metadata

Project
snapcraft
Number
#4356
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Core22 destructive mode now warns when multiple snaps share build state; merged in PR #4839 (67de4083f) and released in Snapcraft 8.3.0.

Resolution: closed resolved

Reason: The maintainer chose warning users rather than adding architecture isolation. Commit 67de4083f from PR #4839 implements the warning, and the 8.3.0 changelog credits #4685 and #4356.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done When running in destructive mode, snapcraft should do one of the following: This issue is referenced in the documentation and should be updated when completed. (both [readthedocs](https://canonical-snapcraft.readthedocs-hosted.com/en/latest/explanation/index.html) and snapcraft.io/docs) #### option 1 organize craft-parts directories by architecture: ``` my-snap-project ├─ amd64 │ ├── parts │ ├── prime │ └── stage └─ arm64 ├── parts   ├── prime   └── stage ``` #### option 2 store the architecture in the craft-parts state file and clean between builds of different architectures ### Why it needs to get done Consider the `snapcraft.yaml` snippet: ```yaml base: core22 architectures: - build-on: amd64 build-for: amd64 - build-on: amd64 build-for: arm64 ``` When `snapcraft --destructive-mode` is executed, it will build for `amd64` and then for `arm64`. On the build for `arm64`, all steps will be skipped. There is no isolation between the builds. This is not a problem for core20 snaps.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Core22 destructive mode now warns when multiple snaps share build state; merged in PR #4839 (67de4083f) and released in Snapcraft 8.3.0.
stealth/space-bunny-alpha — closed not a bug Architecture isolation was not added; core22 now allows reused destructive-mode build directories with a warning, delivered in PR #4839 (Snapcraft 8.3.0).
qwen/qwen3.6-35b-a3b — — Closed without implementing architecture isolation. The destructive mode behavior is now permitted for core22, with a warning message issued to alert users of potential build conflicts.
qwen/qwen3.6-35b-a3b — — Multi-arch destructive builds now proceed without state isolation, skipping steps for subsequent architectures. The team resolved the issue by allowing this behavior in core22 with a warning message instead of implementing directory organization or state cleanup.
qwen/qwen3.6-35b-a3b — — Closed by allowing multi-arch destructive mode builds to proceed without isolation, issuing a warning in core22 instead of implementing architecture-based directory separation or state cleanup.
qwen3.6-35b-a3b-mtp-q6 — — Closed without full isolation. Core22 now permits multi-arch destructive builds to share state, emitting a warning instead of skipping steps.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#4839 (confidence 99%)

    Merged as commit 67de4083f; added the destructive multi-build warning.

  • Related To: canonical/snapcraft#4685 (confidence 90%)

    Credited alongside #4356 in the Snapcraft 8.3.0 changelog.

Related issues

Issue Project State Summary Similarity
#4685 Warn when multiple core22 snaps will be built in destructive mode snapcraft closed Added the destructive-mode warning for multiple core22 builds via #4839 (commit 67de4083f), included in Snapcraft 8.3.0.
87%
#4839 feat: warn when multiple snaps will be built in the same environment snapcraft merged Merged PR #4839 (commit 67de4083f) added a core22 warning for multiple snaps sharing a destructive-mode build environment, fixing #4685 and #4356.
76%
#1827191 --destructive-mode is not available in `snapcraft clean` snapcraft (launchpad) closed Added --destructive-mode support to snapcraft clean in snapcore/snapcraft PR #2577, enabling host-side project artifact cleanup.
72%