lxd: don't inject local snaps on a different arch
Metadata
Current evaluation
Merged in snapcraft#1577 via commit 5cef61310, preventing incompatible local snaps from being injected into cross-architecture LXD builds and using store snaps instead.
Resolution: closed resolved
Reason: PR #1577 was merged as commit 5cef61310. It makes LXD builds for a remote of a different architecture install matching snaps from the store rather than push incompatible local snaps.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
As [brought up in the forum](https://forum.snapcraft.io/t/cleanbuild-remote-on-pi-grabs-wrong-arch-lxc-image/691/15) when running the Snapcraft snap with a remote that has a different architecture it will try to push local snaps that can't be installed. For instance, local x86-64 machine, remote Raspberry Pi, which is armhf. In that case we have to install the snaps from the store instead.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in snapcraft#1577 via commit 5cef61310, preventing incompatible local snaps from being injected into cross-architecture LXD builds and using store snaps instead. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1577 (commit 5cef61310) prevents architecture-incompatible local snaps from being injected into LXD builds; cross-arch remotes now install matching snaps from the store. | |
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix preventing Snapcraft from injecting local snaps into LXD containers with mismatched architectures. Snaps are now fetched from the store instead of failing on remote ARM devices. Fixed a urllib3 test failure. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1364 lxd: Inject snapcraft and core snaps into the container | snapcraft | merged | Merged PR #1364 as 99f5598ac, injecting the host's Snapcraft and core snaps into LXD containers so builds no longer use a mismatched Xenial archive version. | |
| #1568 lxd: don't re-inject the same snaps | snapcraft | merged | Merged PR #1568 as commit 1bd531772, preventing LXD from re-injecting identical snaps by comparing hashes instead of revision-based filenames; fixes LP #1716923. | |
| #1912 lxd: unset SNAP to work-around LXD deb thinking it's a snap | snapcraft | closed | The SNAP-unset workaround for LP #1746612 was rejected and PR #1912 was closed unmerged; no Snapcraft fix landed. | |
| #1865 lxd: always (re-)injects snaps | snapcraft | merged | Merged PR #1865 as e99354492, fixing LP #1741752 by ensuring LXD re-injects required snaps when needed. | |
| #2222 lxd: support new style snap injection | snapcraft | merged | Merged in #2222 via commit 8acd203, adding new-style LXD snap handling, removing sudo-based injection, and consolidating duplicated tests. | |
| #1666735 snapcraft cleanbuild does not work with lxd installed via snap | snapcraft (launchpad) | closed | Fixed by merged canonical/snapcraft#1199 (commit 417989880), making cleanbuild LXD detection packaging-independent instead of relying on apt package metadata. | |
| #1788667 changes in snapd break lxd snap injection for cleanbuild | snapcraft (launchpad) | closed | snapd's 0600 perms on injected snaps broke LXD cleanbuild injection. Fixed by merged PR snapcore/snapcraft#2222 (commit b2bd6b776), adding new-style LXD snap injection; bug closed. | |
| #343 lxd should be a suggestion, not a direct dep | snapcraft | merged | Merged in snapcraft PR #343 as 7147a43ba, changing LXD from a direct dependency to a suggestion and resolving LP #1550381. | |
| #1483 lxd: path cannot have extra forward slashes | snapcraft | merged | Merged in canonical/snapcraft#1483 (commit 1a3c02b43), removing extra leading slashes from LXD mount paths so containers could find snap/snapcraft.yaml. | |
| #1064 fix: skip injecting snaps from host when cross-building | craft-application | closed | Closed as redundant after the same cross-build snap-injection fix merged in canonical/craft-application#1037 via commit 16bd7ac3. |