← Back to issue list

Provide better errors for failures to clear the apt cache

View original Github issue

Metadata

Project
craft-parts
Number
#648
Type
issue
State
open
Author
mr-cal
Labels
Created
2024-02-02 20:31:09+00:00
Updated
2025-03-11 14:29:05+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### What needs to get done See: https://github.com/snapcore/snapcraft/issues/4558 Craft-parts should provide a better error for when the apt-cache cannot be removed. This can be done by wrapping [this block](https://github.com/canonical/craft-parts/blob/bd6c687f30dc72346816d7cd0b4ceabc8e530d92/craft_parts/packages/apt_cache.py#L166) with a try/except and providing a useful and actionable error message. ### Why it needs to get done If a craft app is run in destructive mode with sudo then without sudo, the error message doesn't explain the problem or help the user figure out how to clean their cache.

Evaluation history

No evaluation history available.