← Back to issue list

Snapcraft cleanbuild doesn't work if you're not using the LXD snap

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1746612
Type
issue
State
closed
Author
~kyrofa
Labels
Created
Updated
Closed

Current evaluation

⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.

Closed without resolution. Snapcraft hardcodes the LXD snap path during cleanbuild, causing failures with deb-installed LXD. The report appears abandoned or superseded by updated Snapcraft versions that dynamically detect LXD installations.

Suggested action:

No scores available.

Issue body

I have the LXD deb (v2.21 specifically), not the snap. As of edge, Snapcraft no longer cleanbuilds: $ snapcraft cleanbuild Creating snapcraft-unaffrightedly-sleekiest-tatyana Starting snapcraft-unaffrightedly-sleekiest-tatyana Waiting for a network connection... Network connection established Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB] Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB] Get:5 http://security.ubuntu.com/ubuntu xenial-security/main Sources [107 kB] Get:6 http://archive.ubuntu.com/ubuntu xenial/main Sources [868 kB] Get:7 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2116 B] Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [49.3 kB] Get:9 http://archive.ubuntu.com/ubuntu xenial/restricted Sources [4808 B] Get:10 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1520 B] Get:11 http://archive.ubuntu.com/ubuntu xenial/universe Sources [7728 kB] Get:12 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [435 kB] Get:13 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [189 kB] Get:14 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [200 kB] Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [102 kB] Get:16 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3208 B] Get:17 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1408 B] Get:18 http://archive.ubuntu.com/ubuntu xenial/multiverse Sources [179 kB] Get:19 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7532 kB] Get:20 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4354 kB] Get:21 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB] Get:22 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB] Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [291 kB] Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2524 B] Get:25 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [189 kB] Get:26 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [7972 B] Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [710 kB] Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [295 kB] Get:29 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [579 kB] Get:30 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [234 kB] Get:31 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB] Get:32 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8052 B] Get:33 http://archive.ubuntu.com/ubuntu xenial-backports/main Sources [3436 B] Get:34 http://archive.ubuntu.com/ubuntu xenial-backports/universe Sources [4904 B] Get:35 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4840 B] Get:36 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [3220 B] Get:37 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6612 B] Get:38 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3768 B] Fetched 24.7 MB in 15s (1570 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libfreetype6 Use 'apt autoremove' to remove it. The following NEW packages will be installed: squashfuse 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 17.4 kB of archives. After this operation, 54.3 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 squashfuse amd64 0.1.100-0ubuntu1~ubuntu16.04.1 [17.4 kB] Fetched 17.4 kB in 0s (23.7 kB/s) Selecting previously unselected package squashfuse. (Reading database ... 25537 files and directories currently installed.) Preparing to unpack .../squashfuse_0.1.100-0ubuntu1~ubuntu16.04.1_amd64.deb ... Unpacking squashfuse (0.1.100-0ubuntu1~ubuntu16.04.1) ... Processing triggers for man-db (2.7.5-1) ... Setting up squashfuse (0.1.100-0ubuntu1~ubuntu16.04.1) ... Looking up assertion ['account-key', 'public-key-sha3-384=BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul'] Looking up assertion ['snap-declaration', 'snap-name=core'] Looking up assertion ['snap-revision', 'snap-revision=3978', 'snap-id=99T7MUlRhtI3U0QFgl5mXXESAiSwt776'] error: open /var/lib/snapd/hostfs/home/kyrofa/snap/lxd/common/snapcraft25s084xz/core_3978.assert: no such file or directory Stopping local:snapcraft-unaffrightedly-sleekiest-tatyana Traceback (most recent call last): File "/snap/snapcraft/1076/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==2.38', 'console_scripts', 'snapcraft')() File "/snap/snapcraft/1076/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/snap/snapcraft/1076/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point return ep.load() File "/snap/snapcraft/1076/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2291, in load return self.resolve() File "/snap/snapcraft/1076/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2297, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/cli/__main__.py", line 43, in <module> run(prog_name='snapcraft') File "/snap/snapcraft/1076/lib/python3.6/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/snap/snapcraft/1076/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/snap/snapcraft/1076/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/snap/snapcraft/1076/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/1076/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 218, in cleanbuild lifecycle.cleanbuild(project_options, remote) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_containers.py", line 68, in cleanbuild metadata=config.get_metadata(), remote=remote).execute() File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 162, in execute with self._container_running(): File "/snap/snapcraft/1076/usr/lib/python3.6/contextlib.py", line 82, in __enter__ return next(self.gen) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 81, in _container_running with self._ensure_started(): File "/snap/snapcraft/1076/usr/lib/python3.6/contextlib.py", line 82, in __enter__ return next(self.gen) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 96, in _ensure_started self._ensure_container() File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lxd/_cleanbuilder.py", line 50, in _ensure_container self._inject_snapcraft(new_container=True) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 224, in _inject_snapcraft self._inject_snap('core', tmp_dir) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 284, in _inject_snap ], tmp_dir) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 357, in _inject_assertions self._push_file(filepath, container_filename) File "/snap/snapcraft/1076/lib/python3.6/site-packages/snapcraft/internal/lxd/_containerbuild.py", line 306, in _push_file src, '{}{}'.format(self._container_name, dst)]) File "/snap/snapcraft/1076/usr/lib/python3.6/subprocess.py", line 291, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['lxc', 'file', 'push', '/home/kyrofa/snap/lxd/common/snapcraft25s084xz/core_3978.assert', 'local:snapcraft-unaffrightedly-sleekiest-tatyana/run/core_3978.assert']' returned non-zero exit status 1. Note the path: /var/lib/snapd/hostfs/home/kyrofa/snap/lxd/common/snapcraft25s084xz/core_3978.assert . Particularly the `home/kyrofa/snap/lxd` part: it's assuming I have the LXD snap installed, and dying because I don't.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without resolution. Snapcraft hardcodes the LXD snap path during cleanbuild, causing failures with deb-installed LXD. The report appears abandoned or superseded by updated Snapcraft versions that dynamically detect LXD installations.
qwen/qwen3.6-35b-a3b Closed without resolution. Snapcraft cleanbuild fails when using LXD deb due to a hardcoded path assumption requiring the LXD snap.
qwen3.6-35b-a3b-mtp-q6 Closed without resolution. The bug stems from Snapcraft hardcoding the LXD snap directory path, breaking cleanbuild for deb-installed LXD. The report appears abandoned or superseded by updated container handling in later releases.

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 Closed without resolution or merge. The report notes snapcraft cleanbuild fails to detect LXD installed via snap, suggesting checks via snap list or lxc list instead of apt cache. No fix was implemented or documented.
89%
#1697979 snapcraft fails on initial cleanbuild probe snapcraft (launchpad) closed Closed without resolution. Snapcraft cleanbuild failed due to LXD connection errors when LXD was provided via a third-party snap alias. The report received no comments or fixes and was abandoned.
85%
#1570706 Snapcraft cleanbuild command doesn't work snapcraft (launchpad) closed Closed without resolution, likely abandoned or superseded. The cleanbuild command failed due to LXC hash format incompatibility and container stop errors.
83%
#1703344 snapcraft cleanbuild exits with a traceback when lxd is not installed snapcraft (launchpad) closed Closed without resolution. Missing LXD caused a FileNotFoundError during snapcraft cleanbuild. No comments, fixes, or status updates were provided.
80%
#1822372 Snapcraft cleanbuild on Arch Linux with LXD - AppArmor permission error snapcraft (launchpad) closed Closed without resolution due to prolonged inactivity. The report detailed an AppArmor permission error during snapcraft cleanbuild on Arch Linux with LXD. No comments or fixes were provided, indicating the issue was abandoned or marked as invalid.
79%
#1752498 cleanbuild fails with lxd snap snapcraft (launchpad) closed A user reported snapcraft cleanbuild failing with the LXD snap due to a FUSE mount permission error inside the container. With zero comments and years of inactivity, the report was abandoned and closed without a fix or resolution.
78%
#1685820 cleanbuild doesn't work in distros without /etc/apt/apt.conf.d/ snapcraft (launchpad) closed Closed without resolution. The cleanbuild command failed on non-Debian distros due to missing apt configuration. The feature was subsequently abandoned as Snapcraft deprecated LXD-based cleanbuild and shifted to cloud builders.
77%
#1639641 Don't assume lxd from dpkg snapcraft (launchpad) closed Resolved via merged pull request #904, updating snapcraft cleanbuild to detect LXD installed via snap rather than only checking dpkg.
77%
#1750642 Snapcraft fails in LXD container on Debian 9 snapcraft (launchpad) closed Closed as stale. The Snapcraft LXD container build failure on Debian 9 was not resolved due to outdated Debian and Snapcraft versions no longer being supported.
76%
#1896820 Snapcraft can't be run against a local or remote LXD project snapcraft (launchpad) open Feature request from the LXD maintainer for snapcraft to support LXD projects (local/remote) for isolated or cluster-based builds. ~6 years old, no labels, zero comments, no maintainer response. Overlaps with remote LXD work tracked in snapcraft#4454.
76%