snapcraft 7.0.8+ stopped working on non debian systems
Metadata
Current evaluation
Fixed in snapcore/snapcraft#3843 (commit ed49405fb, merged as 57ecab3bc) by deferring the Debian package import so Snapcraft starts on non-Debian hosts.
Resolution: closed resolved
Reason: PR #3843 deferred the craft_parts.packages.deb import until Debian package handling is needed, preventing startup failures on non-Debian systems. It was merged in commit 57ecab3bc.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Since 7.0.8, specifically since 109df05572f36580367f863e55201a301cdb84ad ("package repositories: force package refresh (#3804)"), Snapcraft has stopped working for non-debian systems to build core22 or snaps for core22 even though it is supposed to build within an LXD container.
Here is the traceback of the error:
```
Traceback (most recent call last):
File "/snap/snapcraft/x8/bin/snapcraft", line 5, in <module>
from snapcraft.cli import run
File "/var/lib/snapd/snap/snapcraft/x8/lib/python3.8/site-packages/snapcraft/cli.py", line 34, in <module>
from . import commands
File "/var/lib/snapd/snap/snapcraft/x8/lib/python3.8/site-packages/snapcraft/commands/__init__.py", line 25, in <module>
from .extensions import (
File "/var/lib/snapd/snap/snapcraft/x8/lib/python3.8/site-packages/snapcraft/commands/extensions.py", line 30, in <module>
from snapcraft.parts.lifecycle import get_snap_project, process_yaml
File "/var/lib/snapd/snap/snapcraft/x8/lib/python3.8/site-packages/snapcraft/parts/__init__.py", line 19, in <module>
from .parts import PartsLifecycle
File "/var/lib/snapd/snap/snapcraft/x8/lib/python3.8/site-packages/snapcraft/parts/parts.py", line 26, in <module>
from craft_parts.packages import Repository, deb
File "/var/lib/snapd/snap/snapcraft/x8/lib/python3.8/site-packages/craft_parts/packages/deb.py", line 44, in <module>
from .apt_cache import AptCache
File "/var/lib/snapd/snap/snapcraft/x8/lib/python3.8/site-packages/craft_parts/packages/apt_cache.py", line 29, in <module>
import apt
File "/var/lib/snapd/snap/snapcraft/x8/lib/python3.8/site-packages/apt/__init__.py", line 36, in <module>
apt_pkg.init_system()
apt_pkg.Error: E:Unable to determine a suitable packaging system type
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed in snapcore/snapcraft#3843 (commit ed49405fb, merged as 57ecab3bc) by deferring the Debian package import so Snapcraft starts on non-Debian hosts. | |
| qwen/qwen3.8-27b | — | closed resolved | Fixed in PR #3843 (commit ed49405fb, merged as 57ecab3bc) which defers the craft_parts.packages.deb import until needed, preventing apt import failures on non-Debian systems. | |
| stealth/space-bunny-alpha | — | closed stale | Closed as stale with no recorded fix after 1507 days without activity. The 7.0.8+ non-Debian apt initialization failure was reported after 109df0557 (snapcraft#3804). | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without discussion. The snapcraft 7.0.8+ regression causing apt_pkg errors on non-Debian systems was likely abandoned or superseded by a later release. | |
| qwen/qwen3.6-35b-a3b | — | — | 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. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Snapcraft 7.0.8+ fails on non-Debian systems due to forced apt package refresh, triggering an apt_pkg error during core22 builds. The issue was abandoned with no comments or fixes. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without documented resolution. The regression caused Snapcraft to fail on non-Debian systems due to an apt_pkg import error after forcing package refresh. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#3843
(confidence 100%)
The merged PR implemented the import-deferral fix in commit ed49405fb.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1980536 snapcraft unusable on systems not using apt | snapcraft (launchpad) | closed | Snapcraft 7.1.1 fixed startup failures on non-APT systems; the 7.0.8 regression was linked to snapcore/snapcraft#3804. | |
| #1983009 Snapcraft 7.1.0 fails to find stage package when cross-compiling | snapcraft (launchpad) | closed | Fixed by canonical/snapcraft#3416 (commit 8f418e3d9), restoring core20 behavior so stage packages come from build-on repositories during cross-compilation. | |
| #1497453 snapcraft fails if it needs to pull a deb that has an uninstallable version on the system | snapcraft (launchpad) | closed | Resolved in release preparation: changelog commit c1a44492b records LP #1497453 as fixed for Snapcraft’s failing deb-fetch handling. | |
| #4285 Snapcraft v7 fails to build core18 snap with local plugins | snapcraft | closed | Snapcraft 7 broke core18 snaps with local plugins (module 'snapcraft' has no attribute 'sources'). Fixed by merged PR #4337 (commit 15011660a) exporting sources to legacy plugins; reporter confirmed success on 7.5.3. | |
| #4408 Snapcraft 7 fails with inline deb822 signing blocks | snapcraft | open | Snapcraft 7's core20 LXD fallback failed on valid inline deb822 Signed-By keys; the affected legacy/core20 code has since been removed. | |
| #1570835 snapcraft 2.8 fails on s390x | snapcraft (launchpad) | closed | Snapcraft 2.8's missing s390x handling was fixed by ubuntu-core/snapcraft PR #461, merged as commit d3c242fa2. | |
| #2099923 Snapcraft builds are failing: install of snap "snapcraft" failed | snapcraft (launchpad) | open | Reported Launchpad Bionic non-i386 builds cannot install Snapcraft 7.x/stable because core20 needs snapd 2.61; the issue remains open, untriaged, and unanswered. | |
| #1731478 Snap of snapcraft fails to run on Solus and openSUSE | snapcraft (launchpad) | closed | Fixed Snapcraft startup on Solus and openSUSE by replacing apt-dependent .deb handling with arfile in snapcore/snapcraft#1729 (ff83bf338). | |
| #1947968 snapcraft missing 22.04 branch | snapcraft (launchpad) | closed | Resolved by opening stable/ubuntu-22.04 and releasing snapcraft revisions 7010 (amd64) and 7013 (s390x), restoring the branch required by the 22.04 package. | |
| #1981551 snapcraft 7 fails on fedora 36, referencing apt | snapcraft (launchpad) | closed | Snapcraft 7.0.11 failed on Fedora 36 when apt_pkg could not identify a packaging system; the maintainer confirmed it was fixed in Snapcraft 7.1.1. |