← Back to issue list

snapcraft fails if it needs to pull a deb that has an uninstallable version on the system

View original Launchpad issue

Metadata

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

Current evaluation

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.

Suggested action:

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
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

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1980536 snapcraft unusable on systems not using apt snapcraft (launchpad) closed Closed without resolution. Snapcraft retained hard apt dependencies, causing crashes on non-Debian systems like Arch Linux. The issue appears abandoned with no fix provided.
76%
#1947968 snapcraft missing 22.04 branch snapcraft (launchpad) closed Closed without resolution. The missing ubuntu-22.04 branch for the snapcraft snap caused dpkg installation failures. Likely abandoned or resolved upstream.
74%
#1548225 Snapcraft/snappy should detect incompatible version mismatches snapcraft (launchpad) closed Abandoned. The report detailed Snapcraft failing to detect version mismatches, causing large snaps to install incorrectly. With zero comments and over a decade of dormancy, it received no resolution and was closed.
73%
#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.
72%
#1590265 snapcraft-parser is not installed with the deb snapcraft (launchpad) closed Abandoned and closed without resolution. The report noted the snapcraft-parser module and binary were missing from the snapcraft deb package.
72%
#2085813 snapcraft not installable snapcraft (launchpad) closed Abandoned and closed due to a GLIBC_2.38 runtime incompatibility during installation. No resolution or fix was provided.
71%
#1887960 snapcraft ignores version specific build-packages snapcraft (launchpad) closed Abandoned and closed without resolution. Version specifiers in build-packages remain ignored, as the referenced TODO in _deb.py was never implemented.
71%
#1688151 snapcraft pull doesn't save the installed build dependencies snapcraft (launchpad) closed Closed without comments or resolution. The bug where snapcraft pull omitted build package dependencies from the pull state file was abandoned.
70%
#1682822 Snapcraft deb does not work on KDE Neon. snap does. snapcraft (launchpad) open Old snapcraft deb package crashes on KDE Neon with 'not supported on this operating system' at import. 9+ years old, no labels or comments; the failing code path no longer exists in the current codebase and the deb install method is superseded by the snap.
70%
#1988858 snapcraft trying to install extra package causing conflict snapcraft (launchpad) closed Closed without a tracked fix or comments. The author reported a build dependency conflict caused by snapcraft pulling extra packages. The issue appears abandoned or resolved by the author.
70%