architectures: allow same arch in multiple build-ons in core20
Metadata
Current evaluation
Closed as an enhancement: overlapping build-on entries already work in core22+ via merged PR #3821 (4876b53); core20 support was declined due to regression and legacy remote-build risk.
Resolution: closed not a bug
Reason: Maintainer mr-cal closed the request on 2025-04-24, explaining that core22 and newer already provide the functionality and that core20 support would be an enhancement with substantial regression and legacy remote-build risk.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### What needs to get done
`core20` snaps should allow the same architecture in multiple build-ons, when a target arch is supplied with `snapcraft --target-arch armhf --enable-experimental-target-arch --destructive-mode`.
Caevaets:
- all 3 cli options in `snapcraft --target-arch armhf --enable-experimental-target-arch --destructive-mode` must be used everytime
- the snap will not be able to be built with `snapcraft remote-build`
### Why it needs to get done
Currently, core20 snaps do not allow the same architecture to be present in multiple build-ons.
Consider the following `snapcraft.yaml`:
```yaml
base: core20
architectures:
- build-on: [amd64, arm64, armhf]
run-on: armhf
- build-on: [amd64, arm64]
run-on: arm64
```
Running snapcraft with or without a target arch produces the following error:
```Issues while validating snapcraft.yaml: The 'architectures' property does not match the required schema: 'amd64' and 'arm64' are present in the 'build-on' of multiple items, which means snapcraft doesn't know which 'run-on' to use when building on those architectures```
When a target arch is supplied, snapcraft has enough information to determine which `build-on/run-on` tuple to use.
source: https://bugs.launchpad.net/snapcraft/+bug/2009520
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed not a bug | Closed as an enhancement: overlapping build-on entries already work in core22+ via merged PR #3821 (4876b53); core20 support was declined due to regression and legacy remote-build risk. | |
| stealth/space-bunny-alpha | — | closed not a bug | Core20 support was rejected as an enhancement; core22+ already supports overlapping build-on entries through build-for. Maintainer closed the request because of implementation and regression risk. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned and closed. Core20 support for duplicate build-on architectures was rejected because core22 and newer bases natively handle this via build-for. Implementing for core20 was deemed too risky and effort-intensive for an enhancement. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as rejected. Multi-build-on architecture support is already natively available in core22 and newer bases. Implementing it for core20 was deemed too risky and effort-intensive for an enhancement, so the request was abandoned. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as rejected. Multi-arch build-on support is already implemented for core22 and newer bases. Backporting to core20 is deemed too high-risk and effort-intensive for an enhancement, so the request was abandoned. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without implementation. Backporting multi-arch build-on support to core20 was rejected due to high regression risk and legacy remote build compatibility issues. The functionality is already available in core22 and newer bases. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
canonical/snapcraft#3821
(confidence 96%)
Merged PR #3821 added the core22 build-on/build-for model, which supports the requested overlapping build-on entries.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3821 meta: architectures | snapcraft | merged | Merged core22 architecture support, including build-on/build-for handling, host and build-instance selection, and SNAPCRAFT_BUILD_FOR filtering, via commit 4876b53. | |
| #3820 providers: specify build-on and build-for in instance name | snapcraft | merged | Merged #3820 as commit 21cb1ab9a, adding build-on and build-for architecture names to provider instance names for core22 multi-architecture support. | |
| #2009520 core18/20: inconsistent architecture parsing | snapcraft (launchpad) | closed | Superseded by snapcore/snapcraft#4340 and #4341. Core22+ overlapping build-on handling merged in #3821 (4876b53); core20 support was declined. |