Provide better errors for failures to clear the apt cache
Metadata
Current evaluation
Closed as superseded: Snapcraft 8.14 added a warning for destructive-mode runs as non-root (craft-application#974) instead of an apt-cache error; legacy apt_cache code later removed.
Resolution: closed superseded
Reason: mr-cal closed the issue noting Snapcraft 8.14 shipped a related improvement that warns when running in destructive mode as a non-root user, implemented in canonical/craft-application#974 and documented in docs/release-notes/snapcraft-8-14.rst ("Destructive mode warning"). The originally proposed try/except around the legacy apt-cache clear never landed; snapcraft_legacy/internal/repo/apt_cache.py was deleted in commit ffb164b7a.
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed superseded | Closed as superseded: Snapcraft 8.14 added a warning for destructive-mode runs as non-root (craft-application#974) instead of an apt-cache error; legacy apt_cache code later removed. | |
| stealth/space-bunny-alpha | — | closed superseded | Superseded in Snapcraft 8.14 by a broader warning for non-root destructive-mode runs, added through canonical/craft-application#974. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed as handled by a related change: craft-application PR #974 (commit 4b213f68), released in snapcraft 8.14, now warns when destructive-mode commands run as non-root. snapcraft_legacy apt_cache.py was also later deleted. | |
| stealth/space-bunny-alpha | — | closed superseded | Closed as superseded by Snapcraft 8.14, which added a warning for destructive-mode use as a non-root user via canonical/craft-application#974. | |
| qwen/qwen3.6-35b-a3b | — | — | Superseded by snapcraft 8.14, which now warns when running destructive mode as a non-root user. The related improvement was merged in canonical/craft-application#974, providing clearer guidance for cache permission issues. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as superseded by a related improvement in snapcraft 8.14. The application now warns when running in destructive mode as a non-root user, preventing the apt cache permission error. Resolved via canonical/craft-application#974. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed and superseded. A related improvement was merged into snapcraft 8.14 via craft-application PR #974, which now warns when running destructive-mode as a non-root user, addressing the cache permission issue. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. A related improvement in snapcraft 8.14 via craft-application PR #974 now warns users when running in destructive-mode as a non-root user, preventing the apt cache permission error and removing the need for manual cleanup. |
Update history
No update history recorded yet.
Related work
-
Superseded By:
canonical/craft-application#974
(confidence 92%)
Craft Application PR cited by the closing maintainer comment as the 8.14 improvement replacing this issue's request.
-
Likely Fixed By:
snapcraft@ffb164b7a
(confidence 55%)
Commit 'chore: remove snapcraft_legacy' deleted the legacy apt_cache code the issue targeted.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3983 repo: raise error when populating the apt cache directory fails | snapcraft | merged | Merged PR #3983 in commit 341037573, making Snapcraft raise a clear error when /etc/apt cannot be copied into its cache (CRAFT-1421). | |
| #648 Provide better errors for failures to clear the apt cache | craft-parts | open | Enhancement request to wrap the apt cache rmtree in _populate_stage_cache_dir with try/except and raise an actionable error when the cache cannot be removed (e.g. sudo then non-sudo destructive runs). Still open, untriaged, tracked as CRAFT-2937. |