lxd: only pass target arch if specified explicitly
Metadata
Current evaluation
Merged via commit 0a7de4515, passing --target-arch to LXD only when explicitly set so builds default to the container architecture.
Resolution: closed resolved
Reason: PR #1493 was merged after approval; commit 0a7de4515 implements the architecture handling and closes the alternative approach in #1498.
Evaluated by: mr-cal-bot
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 |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged via commit 0a7de4515, passing --target-arch to LXD only when explicitly set so builds default to the container architecture. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1493 fixed LXD builds to pass the target architecture only when explicitly specified, otherwise using the container's architecture. | |
| 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. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcore/snapcraft#1498
(confidence 99%)
Alternative implementation that passed original CLI arguments; closed unmerged in favor of #1493.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1498 lxd: pass original CLI arguments down to container | snapcraft | closed | Closed unmerged in favor of #1493, which forwarded --target-arch only when explicitly set; commit 0a7de4515 preserved the container architecture default. | |
| #1718 lxd: let lxd choose the architecture | snapcraft | merged | Merged in #1718 as 834cfce4c, delegating default container architecture selection to LXD while recording the container architecture after startup. | |
| #3152 cli: disable --target-arch for multipass/lxd | snapcraft | merged | PR #3152 merged as commit 2dd5e5d1e, hiding/disabling the --target-arch option for Multipass and LXD builds because it had no effect; follow-up PR #3175 later restored it with a deprecation warning. | |
| #1286 lxd: Setup image and target arch for cross-compilation | snapcraft | merged | Merged #1286 as 6a7372297: LXD now uses a host-architecture image while retaining the target architecture, avoiding slow QEMU emulation during cross-compilation. | |
| #1439 target arch default for containers | snapcraft | closed | Fixed by merged PR #1493 (commit 0a7de4515): LXD now defaults to the container architecture. Competing PR #1498 was closed unmerged. | |
| #2046 lxd: specify arch in lxc image list command | snapcraft | merged | Merged PR #2046 fixed incorrect LXD image metadata by specifying the architecture in lxc image list; merged as commit 828ea5120. |