lxd: only pass target arch if specified explicitly
Metadata
Current evaluation
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.
Suggested action: —
No scores available.
Issue body
As [discussed in the forum discussion](https://forum.snapcraft.io/t/cleanbuild-remote-on-pi-grabs-wrong-arch-lxc-image/691/7) container builds should default to the architecture of the container rather than the client.
~~Alternative approach to #1498~~.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Updates the LXD builder to only pass target architecture when explicitly specified, defaulting to the container's architecture instead of the client's. Resolved after clarifying its relationship to PR #1498 and improving documentation. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix for LXD container builds to only pass the target architecture when explicitly specified, defaulting to the container's architecture instead of the client's. Resolves architecture detection issues and supersedes PR #1498. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #1718 lxd: let lxd choose the architecture | snapcraft | merged | 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. | |
| #3152 cli: disable --target-arch for multipass/lxd | snapcraft | merged | Merged changes disabling the --target-arch CLI flag for multipass and LXD. The flag was non-functional and misleading, so it was removed to prevent confusion while future architecture targeting is developed. Approved and passed CI. | |
| #1498 lxd: pass original CLI arguments down to container | snapcraft | closed | Changes to pass original CLI arguments to LXD containers were closed without merging. The fix for architecture defaults and ignored flags was abandoned as an alternative to #1493 after a discussion on sys.argv handling. |