Repository navigation
actions: offer to remove leftover pacman download directories - #300
Open
ManDrake-hub wants to merge 1 commit into
Open
ManDrake-hub wants to merge 1 commit into
ManDrake-hub wants to merge 1 commit into
Conversation
When a download is interrupted, pacman leaves temporary `download-*` directories in its cache. `pacman -Sc` cannot load them as packages, so it prints an error for each one and leaves them in place. When clearing the package cache, ask the user whether to remove them as well. Skip this while the pacman database is locked, as a running transaction may still be using them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #210.
When a download is interrupted, pacman leaves
download-*temporary directories in its cache.pacman -Sccannot load them as packages, so it prints an error for each one ("could not open file …") and leaves them in place. "Clear package cache" now asks whether to remove them after the usual cleanup:pacman-conf CacheDir./var/lib/pacman/db.lckexists, since a running transaction may still use them.sudo.Tested on CachyOS with paru: the 8 leftover directories were removed. Added a unit test for the directory lookup;
cargo clippy --all-targets -- -D warningsandcargo testpass on nightly.