snapcraft fails if it needs to pull a deb that has an uninstallable version on the system
Metadata
Current evaluation
Resolved in release preparation: changelog commit c1a44492b records LP #1497453 as fixed for Snapcraft’s failing deb-fetch handling.
Resolution: closed resolved
Reason: Commit c1a44492b adds LP #1497453 to Snapcraft’s changelog as a fixed bug, linking the closed report to the release resolution.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I run a wily kernel on a vivid system. I tried to use snapcraft with the following procedure:
$ cd /tmp
$ bzr branch lp:ufw
...
$ cd ./ufw
$ cat > snapcraft.yaml <<EOM
name: ufw
version: 0.35~-1
vendor: Jamie Strandboge <email address hidden>
summary: program for managing a Netfilter firewall
description: Uncomplicated FireWall is a front-end for iptables, to make managing a Netfilter firewall easier. It provides a command line interface with syntax similar to OpenBSD's Packet Filter. It is particularly well-suited as a host-based firewall.
icon: icon.png
parts:
ufw:
type: python3-project
source: .
EOM
$ cp /usr/share/icons/hicolor/64/mimetypes/text-x-apport.png ./icon.png
$ snapcraft stage
Pulling python3
Get:1 dh-python_1.20141111-2ubuntu1_all.deb [65.1 kB]
Fetched 65.1 kB in 0s (0 B/s)
Get:1 libc-dev-bin_2.21-0ubuntu4_amd64.deb [68.6 kB]
Fetched 68.6 kB in 0s (0 B/s)
Get:1 libc6-dev_2.21-0ubuntu4_amd64.deb [1967 kB]
Fetched 1967 kB in 0s (0 B/s)
Get:1 libexpat1_2.1.0-6ubuntu1.1_amd64.deb [70.8 kB]
Fetched 70.8 kB in 0s (0 B/s)
Get:1 libexpat1-dev_2.1.0-6ubuntu1.1_amd64.deb [115 kB]
Fetched 115 kB in 0s (0 B/s)
Get:1 libffi6_3.2.1-2_amd64.deb [17.7 kB]
Fetched 17.7 kB in 0s (0 B/s)
Get:1 libmpdec2_2.4.1-1_amd64.deb [82.7 kB]
Fetched 82.7 kB in 0s (0 B/s)
Get:1 libpython3-dev_3.4.3-1_amd64.deb [7094 B]
Fetched 7094 B in 0s (0 B/s)
Get:1 libpython3-stdlib_3.4.3-1_amd64.deb [6986 B]
Fetched 6986 B in 0s (0 B/s)
Get:1 libpython3.4_3.4.3-3_amd64.deb [1312 kB]
Fetched 1312 kB in 0s (0 B/s)
Get:1 libpython3.4-dev_3.4.3-3_amd64.deb [22.8 MB]
Fetched 22.8 MB in 0s (0 B/s)
Get:1 libpython3.4-minimal_3.4.3-3_amd64.deb [466 kB]
Fetched 466 kB in 0s (0 B/s)
Get:1 libpython3.4-stdlib_3.4.3-3_amd64.deb [2053 kB]
Fetched 2053 kB in 0s (0 B/s)
Get:1 libsqlite3-0_3.8.7.4-1ubuntu0.1_amd64.deb [371 kB]
Fetched 371 kB in 0s (0 B/s)
Get:1 libssl1.0.0_1.0.1f-1ubuntu11.4_amd64.deb [853 kB]
Fetched 853 kB in 0s (0 B/s)
Traceback (most recent call last):
File "/usr/bin/snapcraft", line 33, in <module>
snapcraft.main.main()
File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main
args.func(args)
File "/usr/lib/python3/dist-packages/snapcraft/cmds.py", line 326, in cmd
if not getattr(part, cmd)(force=force):
File "/usr/lib/python3/dist-packages/snapcraft/plugin.py", line 193, in pull
self.code.setup_stage_packages()
File "/usr/lib/python3/dist-packages/snapcraft/__init__.py", line 105, in setup_stage_packages
ubuntu.get(self.PLUGIN_STAGE_PACKAGES + part_stage_packages)
File "/usr/lib/python3/dist-packages/snapcraft/repo.py", line 59, in get
self.apt_cache[pkg].candidate.fetch_binary(destdir=self.download_dir)
File "/usr/lib/python3/dist-packages/apt/package.py", line 590, in fetch_binary
self.size, base, destfile=destfile)
TypeError: argument 2 must be str, not None
[1]
Turned out to be <Version: package:'linux-libc-dev' version:'4.0.0-4.6'> was the problem. 3.19.0-28.30 is the only available version on my system. Two things:
1. snapcraft should use its own sources.list and cache to avoid this sort of thing
2. the error output didn't indicate the progress well enough for me to know what the problem was (from the above, it looked like libssl1.0.0 was the issue, but it wasn't)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Resolved in release preparation: changelog commit c1a44492b records LP #1497453 as fixed for Snapcraft’s failing deb-fetch handling. | |
| stealth/space-bunny-alpha | — | closed stale | Abandoned after 11 years without a documented fix. The incompatible linux-libc-dev version caused python-apt to crash during package fetching, obscuring which package failed. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. Closed without documented resolution or fix. The bug caused a TypeError crash when snapcraft attempted to pull a deb package with an incompatible system version during stage setup. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. Snapcraft crashed with a TypeError when pulling a deb with an uninstallable system version. No fix was implemented. Suggestions included isolating apt sources and improving error diagnostics. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. Likely abandoned or superseded by snapcraft's adoption of containerized builds, which isolate dependencies from the host system and prevent version conflicts. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcraft@c1a44492b
(confidence 90%)
Changelog commit explicitly records LP #1497453 as fixed.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1981979 snapcraft 7.0.8+ stopped working on non debian systems | snapcraft (launchpad) | closed | Fixed in snapcore/snapcraft#3843 (commit ed49405fb, merged as 57ecab3bc) by deferring the Debian package import so Snapcraft starts on non-Debian hosts. | |
| #1482747 Snapcraft uses dget but doesn't depend upon devscripts | snapcraft (launchpad) | closed | Fixed fresh-install staging failures by adding devscripts, which provides dget, as a Snapcraft Debian dependency in commit dc1f106e7. | |
| #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. | |
| #1721932 Package resolution issue results in backtrace | snapcraft (launchpad) | closed | Resolved by snapcraft PR #1647, merged as commit 71f48bdc9 and released in Snapcraft 2.35, surfacing apt errors instead of an unhelpful backtrace. |