lxd: don't re-inject the same snaps
Metadata
Current evaluation
Merged PR #1568 as commit 1bd531772, preventing LXD from re-injecting identical snaps by comparing hashes instead of revision-based filenames; fixes LP #1716923.
Resolution: closed resolved
Reason: The approved PR was merged as commit 1bd531772. It checks snap content hashes before injection, resolving the unnecessary repeated installation reported in LP #1716923.
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`?
-----
Fixes: [bug 1716923](https://bugs.launchpad.net/snapcraft/+bug/1716923)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1568 as commit 1bd531772, preventing LXD from re-injecting identical snaps by comparing hashes instead of revision-based filenames; fixes LP #1716923. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1568 (commit 1bd531772) to stop LXD repeatedly re-injecting identical snaps by comparing snap hashes instead of revision-specific filenames; fixes LP #1716923. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix for an LXD bug that repeatedly re-injected identical snaps due to mismatched revision filenames. The change resolves the issue by comparing snap hashes instead of relying on filename matching, preventing unnecessary reinstallations. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to fix LXD duplicate snap injection. Initial hash checks failed due to arbitrary x-revisions changing filenames. Resolution updated the logic to query the active container snap directly, preventing unnecessary reinstalls. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/snapcraft#1865
(confidence 75%)
Later merged follow-up ensured LXD re-injects required snaps when necessary for LP #1741752.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #1577 lxd: don't inject local snaps on a different arch | snapcraft | merged | Merged in snapcraft#1577 via commit 5cef61310, preventing incompatible local snaps from being injected into cross-architecture LXD builds and using store snaps instead. | |
| #1716923 Installing core snap in container often fails | snapcraft (launchpad) | closed | Fixed by merged PR #1568 (commit 1bd531772), which stopped LXD container builds from re-injecting identical snaps. | |
| #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. | |
| #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. | |
| #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. |