← Back to issue list

Snapcraft 7 fails to launch a LXD container based on host apt sources entries

View original Github issue

Metadata

Project
snapcraft
Number
#5420
Type
issue
State
closed
Author
mr-cal
Labels
Status: Triaged Type: Bug
Created
Updated
Closed

Current evaluation

Closed as a duplicate of #4408. Snapcraft 7 fails to parse PGP fingerprints in host apt sources when launching LXD containers, triggering an apt_pkg.Error. Resolution is tracked in the referenced duplicate.

Suggested action:

No scores available.

Issue body

### Bug Description When using Snapcraft 7 to create core18 snaps, snapcraft fails to parse fingerprints in apt sources entries. ### To Reproduce `snapcraft --use-lxd` ### Environment Snapcraft 7.5 ### snapcraft.yaml ```yaml name: hello-core20 base: core20 version: '0.1' summary: hello description: hello grade: devel confinement: devmode parts: my-part: plugin: nil ``` ### Relevant log output ```shell > snapcraft --use-lxd Sorry, an error occurred in Snapcraft: E:Invalid value set for option Signed-By regarding source https://ppa.launchpadcontent.net/ubuntu-enterprise-desktop/authd/ubuntu/ noble (not a fingerprint), E:The list of sources could not be read. We would appreciate it if you anonymously reported this issue. No other data than the traceback and the version of snapcraft in use will be sent. Would you like to send this error data? (Yes/No/Always/View) [no]: view Traceback (most recent call last): File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/cli.py", line 256, in run _run_dispatcher(dispatcher, global_args) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/cli.py", line 229, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/13058/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run return self._loaded_command.run(self._parsed_command_args) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 265, in run super().run(parsed_args) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 138, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 179, in run yaml_data = process_yaml(snap_project.project_file) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 142, in process_yaml yaml_data = yaml_utils.load(yaml_file) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft/parts/yaml_utils.py", line 94, in load raise errors.LegacyFallback(f"base is {build_base}") snapcraft.errors.LegacyFallback: base is core20 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/cli/legacy.py", line 27, in legacy_run run() File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1666, in invoke rv = super().invoke(ctx) File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context(), *args, **kwargs) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/cli/_runner.py", line 139, in run snap_command.invoke(ctx) File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/13058/lib/python3.8/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/cli/lifecycle.py", line 405, in snap _execute(steps.PRIME, parts=tuple(), pack_project=True, output=output, **kwargs) File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/cli/lifecycle.py", line 141, in _execute build_provider_class.ensure_provider() File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/internal/build_providers/_lxd/_lxd.py", line 90, in ensure_provider if repo.Repo.is_package_installed("lxd") or repo.Repo.is_package_installed( File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/internal/repo/_deb.py", line 535, in is_package_installed with AptCache() as apt_cache: File "/snap/snapcraft/13058/lib/python3.8/site-packages/snapcraft_legacy/internal/repo/apt_cache.py", line 58, in __enter__ self.cache = apt.Cache() File "/snap/snapcraft/13058/lib/python3.8/site-packages/apt/cache.py", line 170, in __init__ self.open(progress) File "/snap/snapcraft/13058/lib/python3.8/site-packages/apt/cache.py", line 232, in open self._cache = apt_pkg.Cache(progress) apt_pkg.Error: E:Invalid value set for option Signed-By regarding source https://ppa.launchpadcontent.net/ubuntu-enterprise-desktop/authd/ubuntu/ noble (not a fingerprint), E:The list of sources could not be read. We would appreciate it if you anonymously reported this issue. No other data than the traceback and the version of snapcraft in use will be sent. Would you like to send this error data? (Yes/No/Always/View) [no]: ``` ### Additional context The apt sources file has a fingerprint for the signed-by key: ``` Types: deb URIs: https://ppa.launchpadcontent.net/ubuntu-enterprise-desktop/authd/ubuntu/ Suites: noble Components: main Signed-By: -----BEGIN PGP PUBLIC KEY BLOCK----- . mQINBGXcujkBEADFF4e0Xj0pyPe6h4E2VNX1rRvja88iVJm9zO54vWfvloA3JRfQ ... ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed as a duplicate of #4408. Snapcraft 7 fails to parse PGP fingerprints in host apt sources when launching LXD containers, triggering an apt_pkg.Error. Resolution is tracked in the referenced duplicate.
qwen/qwen3.6-35b-a3b Reported Snapcraft 7 LXD container launch failures due to apt source fingerprint parsing errors were closed as a duplicate of issue #4408. The report was superseded without direct resolution.
qwen3.6-35b-a3b-mtp-q6 Closed as a duplicate of #4408. Snapcraft 7 fails to parse PGP fingerprints in host apt sources when launching LXD containers, triggering an apt_pkg.Error. Resolution is tracked in the referenced issue.
qwen3.6-35b-a3b-mtp-q6 Closed as a duplicate of #4408. Snapcraft 7 fails to parse PGP public key blocks in host apt sources, triggering an apt_pkg fingerprint error during LXD container initialization. The underlying parsing issue was resolved in the referenced duplicate.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
75%
#1981979 snapcraft 7.0.8+ stopped working on non debian systems snapcraft (launchpad) closed Closed without resolution or comments. The reported apt_pkg error blocking snapcraft 7.0.8+ builds on non-Debian systems remains unfixed and the issue appears abandoned.
73%
#4408 Snapcraft 7 fails with inline deb822 signing blocks snapcraft open Snapcraft 7 core20 LXD builds fail on hosts with modern apt deb822 Signed-By blocks due to a legacy apt package check in snapcraft_legacy. Triaged; root cause identified, but snapcraft_legacy and core20 have since been removed from the codebase.
72%
#4443 snapcraft on ARM 64 - stuck at lxd snapcraft closed Resolved in Snapcraft 7.5.4 by implementing a network timeout instead of an infinite loop. The hang was caused by LXD container networking misconfigurations, often due to Docker or VPN conflicts. Closed as fixed.
72%
#1981551 snapcraft 7 fails on fedora 36, referencing apt snapcraft (launchpad) closed Closed without resolution. Snapcraft 7.0 crashed on Fedora 36 due to an apt dependency error. Downgrading to v6 worked locally. No fix provided; issue appears abandoned.
70%
#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.
70%