Can't update repositories when building for different arch from host
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Cross-architecture repository update bug in snapcraft was closed without discussion or a fix. The report appears abandoned, with no resolution or pull request provided.
Suggested action: —
No scores available.
Issue body
Rnning `snapcraft --use-lxd --build-for=arm64` fails at the package repository update step. Currently (snapcraft rev. 9121) `dpkg` will be used to add a new architecture (when building either in destructive mode or in LXD). For whatever reason, when `apt update` is run the incorrect URL is used for the new architecture (it points to archive.ubuntu.com instead of ports.ubuntu.com).
A simple resolution I've found is making the deb sources in `/etc/apt/sources.list` more explicit by adding `[arch=amd64]` to each line.
Considering snapcraft already modifies the image by running updates and adding foreign architectures, it seems reasonable to at least make the repositories the image uses a bit more explicit architecture-wise.
The particular lines in question where I think this happens:
https://github.com/canonical/craft-archives/blob/cc4a9346eee627948d76ade16041f96b4ad70ff1/craft_archives/repo/apt_sources_manager.py#L220-L224
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Cross-architecture repository update bug in snapcraft was closed without discussion or a fix. The report appears abandoned, with no resolution or pull request provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Cross-architecture builds failed during apt updates due to incorrect Ubuntu archive URLs. The issue was abandoned without a fix or merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Cross-architecture apt update failures during snapcraft builds were closed without resolution. The proposed sources.list architecture tagging fix was not implemented, leaving the bug abandoned. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1980536 snapcraft unusable on systems not using apt | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft retained hard apt dependencies, causing crashes on non-Debian systems like Arch Linux. The issue appears abandoned with no fix provided. | |
| #1788654 snapcraft cleanbuild doesn't work with cross-compile stage-packages | snapcraft (launchpad) | closed | Closed without resolution. Snapcraft cleanbuild fails during cross-compilation because it does not automatically configure multi-arch package support inside the container. No fix was implemented, and the report appears abandoned. | |
| #1997752 base core20: wrong arch triplet | snapcraft (launchpad) | closed | Closed without a fix or resolution, likely abandoned due to inactivity. The report indicated Snapcraft incorrectly sets SNAPCRAFT_ARCH_TRIPLET when building on a mismatched host architecture. No comments or patches were submitted. | |
| #4142 snapcraft remote-build exits with return code 0 even when some snaps failed to build for a given arch | snapcraft | closed | Closed without comments or resolution, indicating the request was abandoned. No official fix or merge details were provided. | |
| #2009278 Can't mix ports.ubuntu.com and archive.ubuntu.com (building multi-arch snaps) | snapcraft (launchpad) | closed | Closed without resolution. Multi-arch snap builds remain unsupported due to apt repository mixing failures and stale package caches before architecture additions. No fix was implemented. | |
| #2015091 snapcraft download debian package from incorrect arch | snapcraft (launchpad) | open | Cross-architecture gadget snap downloads wrong arch deb (amd64 instead of arm64). Issue is 1249 days old with no maintainer engagement, labels, or assignee. |