← Back to issue list

snapcraft should run apt-get update

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1841618
Type
issue
State
open
Author
~abitrolly
Labels
Created
Updated
Closed

Current evaluation

Feature request (2019) for snapcraft to refresh stale apt-get caches in process containers to avoid build failures. Open ~7 years with zero comments, no labels, no maintainer response; no general cache-refresh logic found in the build path.

Suggested action: needs triage

Reason: The issue has no labels, zero comments, and no maintainer interaction in ~7 years (last activity 2561 days ago), so it has clearly never been triaged. I could not confirm the problem is no longer applicable: grep shows apt-get update only in CI (spread.yaml, docs Makefile) and the initrd plugin, not a general cache-refresh in the build path, and the referenced Cirrus CI failure predates current build-environment handling, so closing as stale would be premature without a maintainer confirming the scenario is obsolete.

Impact: 35 Quick Win: 19.25 Staleness: 95 Complexity: 45 Confidence: 60 Support Request: 15

Issue body

When run from a process container, `snapcraft` could fail, because `apt-get` caches are not up to date. https://cirrus-ci.com/task/4766182000820224 The solution is to update the cache if it is too old. There are feature requests for that in `apt`. https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1429285 https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1709603 Some solutions were proposed on StackExchange. https://unix.stackexchange.com/questions/271000/update-apt-get-cache-only-if-its-older-than-certain-time?rq=1

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 35
Quick Win: 19.25
Staleness: 95
Complexity: 45
Confidence: 60
Support Request: 15
needs triage Feature request (2019) for snapcraft to refresh stale apt-get caches in process containers to avoid build failures. Open ~7 years with zero comments, no labels, no maintainer response; no general cache-refresh logic found in the build path.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 90
Support Request: 10
close stale Request to automatically update apt-get caches in snapcraft to prevent build failures in process containers. Issue is over six years old with no maintainer response or comments.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 85
Support Request: 10
close stale Requests automatic apt cache updates to prevent failures in containerized builds. Unlabeled, unassigned, and inactive for nearly 7 years with no maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Feature request for snapcraft to automatically update apt caches in containers to prevent stale cache failures. Unaddressed for nearly 7 years with no maintainer interaction or comments.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 5
close stale Feature request to automatically run apt-get update in snapcraft to prevent process container failures from stale package caches. Unlabelled, no maintainer response, inactive for over six years.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1869544 snapcraft use cached packages across VMs snapcraft (launchpad) open Feature request to cache apt packages centrally across snapcraft build VMs so they survive `snapcraft clean`. No labels or comments in 6+ years; premise tied to outdated-version Launchpad bug 1869542.
77%
#2054099 snapcraft (edge) fails to build core24 snaps. Running "apt update" within base container fails snapcraft (launchpad) open snapcraft edge fails to build core24 snaps due to apt update failing with unresolved ftpmaster.internal in base container. Issue is 931 days old with no maintainer response.
74%
#1583236 snapcraft APT sources checking too strict snapcraft (launchpad) open snapcraft fails builds when APT exits nonzero for non-critical warnings (e.g., outdated hash functions, unsupported PPAs). Unlabelled, zero comments, no maintainer interaction; references obsolete 2015-era sources.
73%
#1660614 snapcraft's nodejs plugin does not refresh the global, user cache before installing dependencies snapcraft (launchpad) open Legacy snapcraft nodejs plugin used npm --cache-min=Infinity, so a stale npm cache could cause ETARGET build failures when a dependency version was newly published. No maintainer response in ~9.5 years; the legacy plugin no longer exists in current snapcraft.
72%
#1793471 snapcraft trggers unnecessary pulls from unrelated file modifications snapcraft (launchpad) open Feature request to add .snapignore support so IDE and .git changes stop marking snapcraft stages stale and triggering unnecessary re-pulls/rebuilds. Open since 2018 with label 18.10-build-caching, zero comments, no maintainer engagement for ~8 years.
72%
#1638840 snapcraft copies /etc/apt/sources but ignores /etc/apt/preferences snapcraft (launchpad) open Snapcraft copies /etc/apt/sources but ignores /etc/apt/preferences, causing wrong package selection in complex setups. 9.8 years old, zero comments, no labels, no maintainer interaction. Current codebase uses craft-archives with AptPreferencesManager, a completely different architecture.
71%
#1626766 Make snapcraft work with ccache snapcraft (launchpad) open Request that snapcraft automatically pick up a host-configured ccache (via $PATH) when compiling parts. Very old (filed ~10 years ago, last activity ~7 years ago), no labels, no maintainer response, and the premise is outdated: modern snapcraft builds run in a confined core20/core22 base where the host PATH/ccache is not inherited.
70%