-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
Current dnf version: dnf5-5.2.17.0-2.fc43.x86_64
The current options of keepcache are only:
True=keep everything always and forever- This will lead to ever accumulating pile of packages in the cache
- This is not practical for any use cases where a high level of automation is intended, as one needs to call
dnf clean […]on a regular basis
False=delete cache after every successful transaction- If I understand this correctly, this will in some scenarios delete the already downloaded updates without installing them¹
- This is not practical for people who often up-/downgrade packages over a low bandwidth connection.
- My main reason for keeping cache is that I want to be able to downgrade recently updated packages to the previous version in case the update broke things like NetworkManager that would be relatively cumbersome to fix otherwise.
Most people probably don't want any of those extremes. Wouldn't it make sense to modify the caching behavior instead to keep at most 2 versions of a package in cache? This way, there would always be a package to downgrade to for a while. Of course this will break at some point, but there are probably very few or no users who are interested in keeping all versions of all packages they ever had installed.
So how about adding two more useful options:
1: Keep one version (usually the currently installed version) of each package in cache2: Keep the two latest version in cache, usually the latest version and the version it was updated from
¹ Example scenario:
- You have automatic download of updates enabled, but
keepcache=False(the default) - Your machine is downloading the updates
- Before the updates get installed, the user manually executes any dnf transaction (install/uninstall/…)
- At the end of the manual transaction, the updates downloaded in step 2. get deleted
- Machine needs to download the updates again
Metadata
Metadata
Assignees
Labels
No labels