← Back to issue list

lxd: Inject snapcraft and core snaps into the container

View original Github issue

Metadata

Project
snapcraft
Number
#1364
Type
pull request
State
merged
Author
kalikiana
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

No scores available.

Issue body

When running snapcraft as a snap and building in a LXD container, currently snapcraft from the Xenial archives is used to do the actual build. This means a newer snap may be using an older snapcraft or vice versa. Therefore the same version that's already running on the host should be pushed into the container. See also [the relevant forum discussion](https://forum.snapcraft.io/t/pushing-the-snapcraft-on-host-into-the-container/387).

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen3.6-35b-a3b-mtp-q6 Merged: Injects the host's snapcraft and core snaps into LXD containers to ensure build environments match the host version, replacing outdated Xenial archive packages.
qwen3.6-35b-a3b-mtp-q6 Merged. Injects the host's snapcraft and core snaps into LXD containers during builds, ensuring version consistency with the host environment and replacing outdated archived versions.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
84%
#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.
80%
#1865 lxd: always (re-)injects snaps snapcraft merged Merged to fix LP: #1741752 by ensuring LXD containers always re-inject snaps. Changes refactor injection logic, reorganize files, and properly handle side-loaded snap assertions. Approved by reviewer and passed CI.
79%
#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.
78%
#2222 lxd: support new style snap injection snapcraft merged Merged after implementing new style snap injection for LXD. Refactored provider logic, normalized code, and removed test duplication. Approved by two reviewers, passed CI, and verified via edge channel testing.
78%
#2621 build providers: support injection for LXD snapcraft merged Merged after approval and passing CI. Implements LXD injection support via snapd's new file API, removes legacy mounts, and refactors code for better separation of concerns across 12 files.
77%
#1412 lxd: snapcraft refresh in containers snapcraft merged Merged after awaiting prerequisite PR #1627. Implements snapcraft refresh for LXD containers, updating apt cache and packages once to persist changes across builds. Resolves container update persistence issues following successful testing.
76%
#1997 lxd: merge existing image info contents snapcraft merged Merged. The change adds functionality to combine SNAPCRAFT_IMAGE_INFO with LXD container metadata in manifest.yaml. Review identified a separate architecture detection bug, tracked as LP: #1760857, which was resolved independently.
76%
#1823511 Inject host's core* and snapcraft snaps when using --use-lxd snapcraft (launchpad) closed Closed without implementation. The request to inject host core and snapcraft snaps into LXD builds, matching Multipass behavior, was abandoned due to prolonged inactivity and zero comments.
76%
#1585 lxd: pass SNAPCRAFT_PARTS_URI through into container snapcraft merged Merged to resolve bug 1719951. The change passes the SNAPCRAFT_PARTS_URI environment variable into LXD containers. Approved by one reviewer, passed CI checks, and added 19 lines across two files.
76%