lxd: let lxd choose the architecture
Metadata
Current evaluation
Merged after two approvals and passing CI. Removes snapcraft's redundant LXD architecture selection logic, delegating it to LXD. Architecture recording now occurs post-container startup. Released with version 2.35.
Suggested action: —
No scores available.
Issue body
lxd implements exactly the same logic as snapcraft does to choose an
architecture when one is not specified, so remove snapcraft's copy.
It is still necessary to record the architecture of the created
container to detect whether snaps can just be copied across, but this
is now done after the container is started, which will still be correct
when/if support for building on a non-default image is merged.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged after two approvals and passing CI. Removes snapcraft's redundant LXD architecture selection logic, delegating it to LXD. Architecture recording now occurs post-container startup. Released with version 2.35. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged after approvals and a passing CI run. Removes snapcraft's duplicate LXD architecture selection logic, deferring to LXD. Integration was delayed until v2.35 to prioritize autopkgtest fixes, then applied to master. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to master after the v2.35 release. Removes snapcraft's duplicate architecture selection logic, deferring to LXD instead. Rebased for CI and merged following approvals. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1577 lxd: don't inject local snaps on a different arch | snapcraft | merged | Merged a fix preventing Snapcraft from injecting local snaps into LXD containers with mismatched architectures. Cross-arch remotes now install snaps from the store. Approved by reviewers and merged after CI checks. | |
| #1493 lxd: only pass target arch if specified explicitly | snapcraft | merged | Merged after two approvals and CI. It fixes container build architecture handling by only passing the target arch when explicitly specified, defaulting to the container's arch. PR #1498 context and description clarity were resolved before merge. | |
| #2046 lxd: specify arch in lxc image list command | snapcraft | merged | Merged fix for LXD image listing regression. Explicitly specifies architecture in the lxc image list command to ensure correct SNAPCRAFT_IMAGE_INFO values in the manifest. Resolves LP: #1760857. Tests updated. | |
| #1364 lxd: Inject snapcraft and core snaps into the container | snapcraft | merged | Merged. Injects the host's snapcraft and core snaps into LXD containers to ensure build version consistency. Approved by one reviewer, modifying nine files with 360 additions and 46 deletions. | |
| #1286 lxd: Setup image and target arch for cross-compilation | snapcraft | merged | Merged into master. Configures LXD container image and target architecture for cross-compilation, using the host architecture image to avoid slow QEMU emulation. Approved by two reviewers and passed CI. | |
| #1434 lxd: clean with no parts should only delete | snapcraft | merged | Merged. Updates snapcraft LXD handling so running clean without arguments only deletes container resources instead of executing commands inside them. Approved by one reviewer and merged. | |
| #1263 lxd: pass through commands into the container | snapcraft | merged | Merged a pull request enabling snapcraft to pass build commands into LXD containers. The change allows remote builds to execute within the container environment, addressing path mounting issues during remote snap creation. Approved by one reviewer, though coverage decreased slightly. |