← Back to issue list

cleanbuild: packaging independent detection.

View original Github issue

Metadata

Project
snapcraft
Number
#1199
Type
pull request
State
merged
Author
sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Merged in canonical/snapcraft#1199 (commit 417989880), replacing repo-based LXD checks with packaging-independent detection and moving the logic into the LXD module.

Resolution: closed resolved

Reason: PR #1199 was approved and merged as commit 417989880. It added packaging-independent LXD detection for snap or manual installations and moved the logic out of the lifecycle.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Don't use the repo to detect if lxd is available as this will prevent use when lxd is provided as a snap or manually installed. It also makes the logic packaging , agnosting, meaning that a translation layer to figure out what provides the `lxc` command is not necessary. The work here also migrates the detection out of the lifecycle and into the lxd module. LP: #1666735 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#1199 (commit 417989880), replacing repo-based LXD checks with packaging-independent detection and moving the logic into the LXD module.
stealth/space-bunny-alpha — closed resolved Merged PR canonical/snapcraft#1199, making cleanbuild LXD detection packaging-independent for snap and manual installs and moving detection into the lxd module.
qwen/qwen3.6-35b-a3b — — Merged changes making LXD detection packaging-independent for snap and manual installs. Detection logic moved from lifecycle to the lxd module, eliminating the translation layer. Approved, passed CI, and merged across four files.
qwen3.6-35b-a3b-mtp-q6 — — Merged. Refactored LXD detection to be packaging-agnostic by removing repository dependency and moving logic from lifecycle to the lxd module, enabling support for snap and manual installations.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
81%
#1796980 Remove cleanbuild snapcraft (launchpad) closed Merged snapcore/snapcraft#2335 as 27ec9ba63, removing LXD lifecycle builds for base-based snaps and making cleanbuild redundant for them.
72%
#1984 fix(snap): check if LXD is actually installed charmcraft merged Merged PR canonical/charmcraft#1984 (commit 02539ab0) adds early LXD detection to the snap configure/remove hooks so they bail out instead of triggering the lxd-installer snap; fixes #1982.
71%
#1655 lxd: distinguish argless clean from clean -s pull snapcraft merged Merged in snapcraft#1655 (ed32603c7), fixing LXD cleanup so bare clean removes build containers while clean -s pull preserves or recreates them.
70%
#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.
70%
#1639641 Don't assume lxd from dpkg snapcraft (launchpad) closed Linked PR canonical/snapcraft#904 was closed unmerged as stale in Feb 2017; dpkg-only LXD detection was later fixed by merged #1199 (417989880).
70%