← Back to issue list

Newer appstream causes snapcraft to fail

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1747715
Type
issue
State
closed
Author
~popey
Labels
stacktrace
Created
Updated
Closed

Current evaluation

Snapcraft now catches APT package-cache update failures instead of propagating the raw exception, resolving the AppStream hash-mismatch failure via snapcore/snapcraft#2079 (d879b2e3a).

Resolution: closed resolved

Reason: The error-handling fix was merged as commit d879b2e3a through snapcore/snapcraft#2079. A maintainer linked that PR as the resolution for this failure.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I'm using KDE Neon which is based on 16.04 with some extra PPAs. One PPA has a newer version of appstream which updates /etc/apt/apt.conf.d/50appstream. Running apt-get update on this machine works fine, but when snapcraft does an apt update it fails with "Hash sum mismatch". Setting target machine to 'amd64' Preparing to pull desktop-gtk2 Hit http://gb.archive.ubuntu.com/ubuntu xenial InRelease Hit http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB] Get:2 http://archive.neon.kde.org/user/lts xenial InRelease [15.5 kB] Get:3 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB] Hit https://deb.nodesource.com/node_9.x xenial InRelease Get:4 http://security.ubuntu.com/ubuntu xenial-security/main Sources [107 kB] Get:5 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2116 B] Get:6 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [49.6 kB] Get:7 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1520 B] Get:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [435 kB] Get:9 http://gb.archive.ubuntu.com/ubuntu xenial-backports/main Sources [3436 B] Get:10 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [391 kB] Get:11 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [62.7 kB] Get:12 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [71.2 kB] Get:13 http://gb.archive.ubuntu.com/ubuntu xenial-backports/universe Sources [4904 B] Get:14 http://gb.archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4840 B] Get:15 http://gb.archive.ubuntu.com/ubuntu xenial-backports/main i386 Packages [4832 B] Get:16 http://gb.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3324 B] Get:17 http://gb.archive.ubuntu.com/ubuntu xenial-backports/main DEP-11 64x64 Icons [29 B] Get:18 http://gb.archive.ubuntu.com/ubuntu xenial-backports/main DEP-11 128x128 Icons [29 B] Get:19 http://gb.archive.ubuntu.com/ubuntu xenial-backports/restricted amd64 DEP-11 Metadata [194 B] Get:20 http://gb.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6628 B] Get:21 http://gb.archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages [6612 B] Get:22 http://gb.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [4696 B] Get:23 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 128x128 Icons [181 kB] Get:24 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7224 B] Get:25 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages [7224 B] Get:26 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 DEP-11 Metadata [200 B] Err http://gb.archive.ubuntu.com/ubuntu xenial-backports/main DEP-11 128x128 Icons Hash Sum mismatch Get:27 http://gb.archive.ubuntu.com/ubuntu xenial-backports/universe DEP-11 64x64 Icons [2717 B] Get:28 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [201 kB] Get:29 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [162 kB] Get:30 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [51.4 kB] Get:31 http://gb.archive.ubuntu.com/ubuntu xenial-backports/universe DEP-11 128x128 Icons [5522 B] Get:32 http://gb.archive.ubuntu.com/ubuntu xenial-backports/multiverse amd64 DEP-11 Metadata [216 B] Get:33 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [85.1 kB] Get:34 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 128x128 Icons [226 kB] Get:35 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3208 B] Get:36 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages [3380 B] Get:37 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [212 B] Get:38 http://security.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 64x64 Icons [29 B] Get:39 http://security.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 128x128 Icons [29 B] Err http://security.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 128x128 Icons Hash Sum mismatch Get:40 http://gb.archive.ubuntu.com/ubuntu xenial-backports/multiverse DEP-11 64x64 Icons [29 B] Get:41 http://gb.archive.ubuntu.com/ubuntu xenial-backports/multiverse DEP-11 128x128 Icons [29 B] Fetched 220 kB in 0s (0 B/s) Traceback (most recent call last): File "/snap/snapcraft/1094/lib/python3.6/site-packages/apt/cache.py", line 452, in update pulse_interval) SystemError: E:Failed to fetch copy:/home/alan/.cache/snapcraft/stage-packages/apt/a810ed86fa085532f20ab86eb7554a1ff527e7f8f46e49c343abc3d7c4d141ae0c39e374361c05f4561cf2aec6689aac/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_multiverse_dep11_icons-64x64.tar.gz Hash Sum mismatch, E:Failed to fetch copy:/home/alan/.cache/snapcraft/stage-packages/apt/a810ed86fa085532f20ab86eb7554a1ff527e7f8f46e49c343abc3d7c4d141ae0c39e374361c05f4561cf2aec6689aac/var/lib/apt/lists/partial/gb.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_dep11_icons-64x64.tar.gz Hash Sum mismatch, E:Some index files failed to download. They have been ignored, or old ones used instead. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/snap/snapcraft/1094/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==2.39', 'console_scripts', 'snapcraft')() File "/snap/snapcraft/1094/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/1094/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point return ep.load() File "/snap/snapcraft/1094/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2291, in load return self.resolve() File "/snap/snapcraft/1094/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/1094/lib/python3.6/site-packages/snapcraft/cli/__main__.py", line 43, in <module> run(prog_name='snapcraft') File "/snap/snapcraft/1094/lib/python3.6/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/snap/snapcraft/1094/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/snap/snapcraft/1094/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/snap/snapcraft/1094/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/1094/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 111, in prime _execute('prime', parts, **kwargs) File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 33, in _execute lifecycle.execute(command, project_options, parts) File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 79, in execute _Executor(config, project_options).run(step, part_names) File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 185, in run self._run_step(step, part, part_names) File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 215, in _run_step getattr(part, 'prepare_{}'.format(step))() File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 265, in prepare_pull self._fetch_stage_packages() File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/pluginhandler/__init__.py", line 251, in _fetch_stage_packages stage_packages) File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/repo/_deb.py", line 307, in get with self._apt.archive(self._cache.base_dir) as apt_cache: File "/snap/snapcraft/1094/usr/lib/python3.6/contextlib.py", line 82, in __enter__ return next(self.gen) File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/repo/_deb.py", line 142, in archive raise e File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/repo/_deb.py", line 133, in archive apt_cache = self._setup_apt(cache_dir) File "/snap/snapcraft/1094/lib/python3.6/site-packages/snapcraft/internal/repo/_deb.py", line 126, in _setup_apt sources_list=sources_list_file) File "/snap/snapcraft/1094/lib/python3.6/site-packages/apt/cache.py", line 454, in update raise FetchFailedException(e) apt.cache.FetchFailedException: E:Failed to fetch copy:/home/alan/.cache/snapcraft/stage-packages/apt/a810ed86fa085532f20ab86eb7554a1ff527e7f8f46e49c343abc3d7c4d141ae0c39e374361c05f4561cf2aec6689aac/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_multiverse_dep11_icons-64x64.tar.gz Hash Sum mismatch, E:Failed to fetch copy:/home/alan/.cache/snapcraft/stage-packages/apt/a810ed86fa085532f20ab86eb7554a1ff527e7f8f46e49c343abc3d7c4d141ae0c39e374361c05f4561cf2aec6689aac/var/lib/apt/lists/partial/gb.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_dep11_icons-64x64.tar.gz Hash Sum mismatch, E:Some index files failed to download. They have been ignored, or old ones used instead.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Snapcraft now catches APT package-cache update failures instead of propagating the raw exception, resolving the AppStream hash-mismatch failure via snapcore/snapcraft#2079 (d879b2e3a).
stealth/space-bunny-alpha — closed resolved Snapcraft's apt cache-update error handling was fixed by merged PR #2079 (commit d879b2e3a), including cleanup after hash-sum mismatches.
stealth/space-bunny-alpha — closed stale Closed as stale without a fix or explanation after 2,940 days of inactivity; the Snapcraft 2.39 AppStream/DEP-11 apt hash-mismatch report remains unresolved (LP #1747715).
stealth/space-bunny-alpha — closed stale Closed without a recorded fix or explanation after 2,940 days of inactivity; the Snapcraft 2.39 AppStream/DEP-11 apt hash-mismatch report was left unresolved.
qwen/qwen3.6-35b-a3b — — Abandoned. A newer appstream package caused snapcraft to fail with a Hash sum mismatch during apt updates. No fix was applied; likely superseded by upstream changes due to age and zero comments.
qwen/qwen3.6-35b-a3b — — Closed without resolution. A newer appstream package caused snapcraft's apt update to fail with hash mismatches. No comments or fixes were provided, indicating the report was abandoned or superseded by newer software versions.
qwen/qwen3.6-35b-a3b — — Closed without resolution. A newer appstream package altered apt configuration, causing hash sum mismatches during snapcraft's apt update. No fix was provided, and the issue was closed due to inactivity.
qwen3.6-35b-a3b-mtp-q6 — — Closed without comments. Likely abandoned or superseded by newer appstream and snapcraft versions that resolved the apt hash mismatch.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#2079 (confidence 100%)

    Merged commit d879b2e3a catches errors while updating Snapcraft's APT package cache.

Related issues

Issue Project State Summary Similarity
#1583236 snapcraft APT sources checking too strict snapcraft (launchpad) open Snapcraft still turns any apt-get update failure into a package-list refresh error; this old report needs a modern reproducer and a policy for distinguishing harmless source failures.
70%